17.10.2011, 01:57
This command auto detects if the player is on/off admin duty and set their status based off that so no need to /aduty on/off now its just /aduty
post your define for COLOR_BAN
post your define for COLOR_BAN
pawn Code:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_WHITE,"You are not authorized to use that command.");
else
{
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerColor(playerid, COLOR_BAN);
return SendClientMessage(playerid, COLOR_GREEN, "You are now administrator duty {29EB17} On.");
}
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
PlayerInfo[playerid][pAdminDuty] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
return SendClientMessage(playerid, COLOR_GREEN, "You are now administrator duty {EB4C17} Off");
}
}
return 1;
}