Skip to content

Commit

Permalink
Recompile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganter1234 authored Nov 13, 2023
1 parent 40f687b commit 7ebee92
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 48 deletions.
62 changes: 29 additions & 33 deletions GetSteamID.cs
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}");
}
}
}
31 changes: 16 additions & 15 deletions GetSteamID.csproj
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>

0 comments on commit 7ebee92

Please sign in to comment.