17.10.2013, 12:17
pawn Код:
// global variable
new
Previous_Colour[ MAX_PLAYERS ]
;
pawn Код:
CMD:adminduty(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"[Error]: You're not authorized to use this command.");
if(aDuty[playerid] == 0)
{
aDuty[playerid] = 1;
SCM(playerid, COLOR_ADMIN, "[Admin]: You're now ON adminduty.");
Previous_Colour[playerid] = GetPlayerColor(playerid);
SetPlayerColor(playerid, COLOR_ADMIN);
}
else if(aDuty[playerid] == 1)
{
aDuty[playerid] = 0;
SCM(playerid, COLOR_ADMIN, "[Admin]: You're now OFF adminduty.");
SetPlayerColor(playerid, Previous_Colour[playerid]);
}
return 1;
}