19.03.2019, 14:21
pawn Код:
stock SetAdminDuty(playerid, state)
{
switch(state)
{
case 1:
{
OnDuty[playerid] = 1;
SetPlayerHealth(playerid, FLOAT_INFINITY);
SCMTAEX(COLOR_YELLOW, "» %s (%d) is now on duty.", ReturnPlayerName(playerid), playerid);
SetPlayerColor(playerid, COLOR_YELLOW);
}
case 0:
{
OnDuty[playerid] = 0;
SetPlayerHealth(playerid, MAX_HEALTH);
SCMTAEX(COLOR_YELLOW, "» %s (%d) is now off duty.", ReturnPlayerName(playerid), playerid);
new col = random(sizeof (PlayerColors));
SetPlayerColor(playerid, PlayerColors[col]);
}
}
}
pawn Код:
switch(OnDuty[playerid])
{
case 0: SetAdminDuty(playerid, 1); //Admin duty is off, enable it...
case 1: SetAdminDuty(playerid, 0); //Admin duty is on, disable it...
}
Quote:
error 010: invalid function or declaration error 001: expected token: "-identifier-", but found ")" warning 202: number of arguments does not match definition warning 202: number of arguments does not match definition |