30.11.2009, 15:41
Hi there i'm using this mute command:
But i've have these 3 errors:
Whats wrong?
Код:
public OnPlayerText(playerid, text[]) <----- (503) { if(Muted[playerid] == 1) { SendClientMessage(playerid, RED, " You are muted and cannot talk. "); return 0; <----- (506) } return 1; <----(508) }
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new tmp[256]; new idx; cmd = strtok(cmdtext, idx); if(strcmp(cmd, " /mute ", true) == 0) { if(IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, color, " Usage: /mute [id] "); new giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, color, " Player not connected ! "); new name[24], name2[24], str[128]; GetPlayerName(playerid, name, 24); GetPlayerName(giveplayerid, name2, 24); format(str, sizeof str, " Administrator %s has muted %s ", name, name2); SendClientMessageToAll(color, str); Muted[giveplayerid] = 1; return 1; } else return SendClientMessage(playerid, color, " Not an administrator! "); } return 0; }
Код:
(503)error 010: invalid function or declaration (506)error 010: invalid function or declaration (508)error 010: invalid function or declaration
Whats wrong?