15.06.2009, 12:46
I have finaly fixed a police radio, but I only have 2 errors left to fix... but I cant figure it out.
Here is the script:
public OnPlayerCommandText(playerid, cmdtext[])
On the bottom of my script.
The errors:
error 017: undefined symbol "playerid"
error 054: unmatched closing brace ("}")
Thanks so mutch!
Here is the script:
public OnPlayerCommandText(playerid, cmdtext[])
Код:
if(strcmp(cmdtext , "/radio", true) == 0) { if(GetPlayerTeam(playerid) != 5) return SendClientMessage(playerid,COLOR_RED, "Identification Error - You need rank 1 to do this."); { if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3)) { new string[128]; new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),"*Radio: %s:%s",playername,cmdtext[128]); SendCopMessage(COLOR_BLUE, string); return 1; } } } return 0; }
Код:
SendCopMessage(color, text[]) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { if(GetPlayerTeam(playerid) != 5) SendClientMessage(i, color, text); } } } }
error 017: undefined symbol "playerid"
error 054: unmatched closing brace ("}")
Thanks so mutch!