09.07.2011, 08:07
Hi all. Could somebody help to fix this cmd:
It returns one error:
Error line is "else"
Thx
pawn Код:
CMD:adminduty(playerid, params[])
{
new string[64];
if (PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use this command!");
if (PlayerInfo[playerid][pAdminLevel] <= 3) return SendClientMessage(playerid, 0x868479FF, "TIP: Use /modduty to go on duty!");
{
format(string, sizeof(string), "ADMINDUTY: You are now admin on duty! (Your adminlevel is %s) ", pAdminLevel);
SendClientMessage(playerid, 0x00FF00FF, string);
PlayerInfo[playerid][pAdminDuty] = 1;
}
else
{
PlayerInfo[playerid][pAdminDuty] = 0;
SendClientMessage(playerid, 0x00FF00FF, "ADMINDUTY: You are now admin off-duty!");
}
return 1;
}
pawn Код:
error 029: invalid expression, assumed zero
Thx