11.04.2012, 11:20
OMG i get demoted to a level 0 admin when /aduty coz the [pAdmin] after being offduty was 0 but what to write their to have no changes in your admin level after being offduty with /aduty?
Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "You are not a admin to use this command!");
if(PlayerInfo[playerid][pAdmin] == 2)
{
SendClientMessage(playerid, COLOR_GREEN, "You are now on duty admin! Remember to check /reports!");
PlayerInfo[playerid][pAdmin] = 2;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
new string[128];
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_YELLOW, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are now off admin duty!");
new string[128];
format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_YELLOW, string);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
PlayerInfo[playerid][pAdmin] = 99999;
}
return 1;
}

