Mute command error's
#1

Hi there i'm using this mute command:

Код:
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;
}
But i've have these 3 errors:

Код:
(503)error 010: invalid function or declaration
(506)error 010: invalid function or declaration
(508)error 010: invalid function or declaration

Whats wrong?
Reply


Messages In This Thread
Mute command error's - by jaksimaksi - 30.11.2009, 15:41
Re: Mute command error's - by [NYRP]Mike. - 30.11.2009, 17:16
Re: Mute command error's - by Rac3r - 30.11.2009, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)