|
error 001: expected token: ")", but found "[" |
if (!isnull(PlayerInfo[playerid][pAdminName])) return SendClientMessage(playerid, COLOR_LIGHTRED, "You have not got an administration name.");
if (!isnull(PlayerInfo[playerid][pAdminName)) return SendClientMessage(playerid, COLOR_LIGHTRED, "You have not got an administration name.");
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128];
switch(AdminDuty[playerid])
{
case 0:
{
if (!isnull(PlayerInfo[playerid][pAdminName])) return SendClientMessage(playerid, COLOR_LIGHTRED, "You have not got an administration name.");
AdminDuty[playerid] = 1;
SetPlayerHealth(playerid, 500000);
SetPlayerArmour(playerid, 500000);
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s is now on administrative duty.", GetNameEx(playerid));
SendClientMessageToAll(COLOR_LIGHTBLUE, " A administrative team member is now on duty.");
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
}
case 1:
{
AdminDuty[playerid] = 0;
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s is now off administrative duty.", GetNameEx(playerid));
SetPlayerColor(playerid,-1);
SendClientMessageToAll(COLOR_YELLOW, string);
if (!isnull(PlayerInfo[playerid][pName1])) SetPlayerName(playerid, PlayerInfo[playerid][pName1]);
}
}
}
else
{
return SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command.");
}
return 1;
}