Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.07 KB | None | 0 0
  1. if(strcmp(cmd, "/adminduty", true) == 0) // Level 1+ command
  2.     {
  3.     new
  4.         pname[MAX_PLAYER_NAME],
  5.         string[128];
  6.     GetPlayerName(playerid, pname, sizeof(pname));
  7.     if(PlayerInfo[playerid][pAdminLevel] > 1)
  8.         {
  9.         if(PlayerInfo[playerid][pAdminDuty] == 0) // If the adminstror is OFF duty.
  10.             {
  11.             SetPlayerSkin(playerid, 0);
  12.             SetPlayerColor(playerid, COLOR_WHITE);
  13.             PlayerInfo[playerid][pAdminDuty] = 1;
  14.             format(string, sizeof(string), "[ADMIN MESSAGE]: Adminstror %s is now on admin duty!", pname);
  15.             AdminMessage(string);
  16.             SendClientMessage(playerid, COLOR_WHITE, "You are on admin duty!");
  17.             return 1;
  18.             }
  19.         else if(PlayerInfo[playerid][pAdminDuty] == 1) // If the player is ON duty.
  20.             {
  21.             PlayerInfo[playerid][pAdminDuty] = 0;
  22.             SetPlayerHealth(playerid, 0);
  23.             format(string, sizeof(string), "[ADMIN MESSAGE]: Adminstror %s is now off duty!", pname);
  24.             AdminMessage(string);
  25.             SendClientMessage(playerid, COLOR_WHITE, "You are off admin duty!");
  26.             }
  27.         return 1;
  28.         }
  29.         else return CommandError(playerid);
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement