-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40f687b
commit 7ebee92
Showing
2 changed files
with
45 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
using System; | ||
using CounterStrikeSharp.API; | ||
using CounterStrikeSharp.API.Core; | ||
using CounterStrikeSharp.API.Core.Attributes.Registration; | ||
using CounterStrikeSharp.API.Modules.Commands; | ||
using CounterStrikeSharp.API.Modules.Memory; | ||
using CounterStrikeSharp.API.Modules.Menu; | ||
using CounterStrikeSharp.API.Modules.Utils; | ||
using CounterStrikeSharp.API.Modules.Entities; | ||
|
||
namespace GetSteamID; | ||
public class GetSteamID : BasePlugin | ||
{ | ||
public override string ModuleName => "Get SteamID"; | ||
public override string ModuleVersion => "1.0.0"; | ||
public override string ModuleAuthor => "Ganter1234"; | ||
|
||
[ConsoleCommand("steam", "Get your SteamID")] | ||
public void SteamCommand(CCSPlayerController? player, CommandInfo command) | ||
{ | ||
if(player != null && player.PlayerPawn != null && player.PlayerPawn.IsValid) | ||
{ | ||
var steamid64 = player.SteamID; | ||
SteamID steam = new SteamID(steamid64); | ||
var steamid3 = steam.SteamId3; | ||
player.PrintToChat($"Приветствую, {ChatColors.Green}{player.PlayerName}!"); | ||
player.PrintToChat($"SteamID64: {ChatColors.Red}{steamid64}"); | ||
player.PrintToChat($"SteamID2: {ChatColors.Purple}{steam.SteamId2}"); | ||
player.PrintToChat($"SteamID3: {ChatColors.Yellow}{steamid3}"); | ||
steamid3 = steamid3.Replace("[", "").Replace("U:1:", "").Replace("]", ""); | ||
player.PrintToChat($"AccountID: {ChatColors.Olive}{steamid3}"); | ||
} | ||
} | ||
using CounterStrikeSharp.API.Core; | ||
using CounterStrikeSharp.API.Core.Attributes.Registration; | ||
using CounterStrikeSharp.API.Modules.Commands; | ||
using CounterStrikeSharp.API.Modules.Utils; | ||
using CounterStrikeSharp.API.Modules.Entities; | ||
|
||
namespace GetSteamID; | ||
public class GSID : BasePlugin | ||
{ | ||
public override string ModuleName => "Get SteamID"; | ||
public override string ModuleVersion => "1.0.0"; | ||
public override string ModuleAuthor => "Ganter1234"; | ||
|
||
[ConsoleCommand("steam", "Get your SteamID")] | ||
public void SteamCommand(CCSPlayerController? player, CommandInfo command) | ||
{ | ||
if(player != null && player.PlayerPawn != null && player.PlayerPawn.IsValid) | ||
{ | ||
var steamid64 = player.SteamID; | ||
SteamID steam = new SteamID(steamid64); | ||
var steamid3 = steam.SteamId3; | ||
player.PrintToChat($"Приветствую, {ChatColors.Green}{player.PlayerName}!"); | ||
player.PrintToChat($"SteamID64: {ChatColors.Red}{steamid64}"); | ||
player.PrintToChat($"SteamID2: {ChatColors.Purple}{steam.SteamId2}"); | ||
player.PrintToChat($"SteamID3: {ChatColors.Yellow}{steamid3}"); | ||
steamid3 = steamid3.Replace("[", "").Replace("U:1:", "").Replace("]", ""); | ||
player.PrintToChat($"AccountID: {ChatColors.Olive}{steamid3}"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Platforms>AnyCPU;x86</Platforms> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="CounterStrikeSharp.API"> | ||
<HintPath>..\CounterStrikeSharp.API.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Platforms>AnyCPU;x86</Platforms> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="C:\Users\vital\Desktop\Разное\Скриптинг\Скриптинг CS2 (csharp)\managed\CounterStrikeSharp.API.dll"> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
</Project> |