10.10.2011, 07:59
EDIT: I think i'v fixed it,
But I get four errors.. I think its because the else part.
But how would I Send a message to an Admin if hes on duty? And not to normal players
pawn Код:
CMD:aduty(playerid,params[]){
new string[128];
if(PlayerInfo[playerid][pAdminDuty] == 0)
format(string,sizeof(string),"%s has just went on Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
SetPlayerHealth(playerid,500000);
SetPlayerColor(playerid,COLOR_CYAN);
Player[playerid][pAdminDuty] = 1;
}
else
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
format(string,sizeof(string),"%s has just went off admin duty!");
SendClientMessageToAll(playerid,COLOR_RED,string);
Player[playerid][pAdminDuty] = 0;
}
return 1;
}
Код:
C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(707) : error 017: undefined symbol "Player" C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(707) : warning 215: expression has no effect C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(707) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(707) : error 029: invalid expression, assumed zero C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(707) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.