Guest User

[SM] SteamID shower

a guest
Jun 2nd, 2018
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.01 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. #pragma newdecls  required
  4. #pragma semicolon 1
  5.  
  6. public Plugin myinfo = {
  7.   description = "Shows all SteamID for player",
  8.   version     = "1.0",
  9.   author      = "CrazyHackGUT aka Kruzya",
  10.   name        = "[ANY] SteamID shower",
  11.   url         = "https://kruzya.me/"
  12. };
  13.  
  14. stock const char  gc_szAuthNames[][]  = { "Engine ID", "v2", "v3", "Community ID" };
  15.  
  16. public void OnPluginStart() {
  17.   RegConsoleCmd("sm_myserial", CmdHandler);
  18. }
  19.  
  20. public Action CmdHandler(int iClient, int iArgC) {
  21.   if (iClient == 0) return Plugin_Handled;
  22.   if (!IsClientAuthorized(iClient)) {
  23.     ReplyToCommand(iClient, "[SM] Повторите попытку позднее.");
  24.     return Plugin_Handled;
  25.   }
  26.  
  27.   char szBuffer[32];
  28.   for (AuthIdType iAuth = AuthId_Steam2; view_as<int>(iAuth) < 4; ++iAuth)
  29.     if (GetClientAuthId(iClient, iAuth, szBuffer, sizeof(szBuffer)))
  30.       ReplyToCommand(iClient, "[SM] Ваш Steam %s: %s", gc_szAuthNames[view_as<int>(iAuth)], szBuffer);
  31.   return Plugin_Handled;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment