Need some help please
#1

I'm trying to make this kick a player when they connect with an InvalidName

This is what i have:

pawn Код:
new InvalidNames[] =
{
  "Britney_Spears",
  "Mr_Bean",
  "Fuck_Admins"
};
pawn Код:
public OnPlayerConnect(playerid)
{
   new plname[MAX_PLAYER_NAME];
   GetPlayerName(playerid, plname, sizeof(plname));
   for(new a = 0; a < sizeof(InvalidNames); a++)
   {
      if(strfind(plname, a, true) == -1)
      {
         new string[256];
         format(string, sizeof(string), "No. You are not '%s'", plname);
         SendClientMessage(playerid, COLOR_LIGHTRED, string);
         Kick(playerid);
         return 1;
      }
   }
}
But I get this error and warning:

pawn Код:
(2586) : error 035: argument type mismatch (argument 2)
(42345) : warning 203: symbol is never used: "InvalidNames"
line 2586 is
pawn Код:
if(strfind(plname, a, true) == -1)
and line 42345 isn't even in my script, the last line in my script is 42344
Reply


Messages In This Thread
Need some help please - by Gappy - 28.05.2009, 10:23
Re: Need some help please - by Gappy - 28.05.2009, 11:42
Re: Need some help please - by Jakku - 28.05.2009, 13:58
Re: Need some help please - by [eLg]Timmy - 28.05.2009, 14:04
Re: Need some help please - by lol2112 - 28.05.2009, 14:05
Re: Need some help please - by Badger(new) - 28.05.2009, 14:17
Re: Need some help please - by lol2112 - 28.05.2009, 14:23
Re: Need some help please - by Gappy - 29.05.2009, 04:04

Forum Jump:


Users browsing this thread: 4 Guest(s)