[UN SOLVED] Autokick wrong ip + name
#4

pawn Код:
new name[16];
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
GetPlayerName(playerid, name, sizeof(name));
if(!strcmp(name, "[SU]BP13", 8))
{
   if(strcmp(plrIP, "YOUR IP HERE"))
   {
     Kick(playerid);
   }
}
Yes it will work but look at what i posted above. Optimized code (i believe that "welcome blablablah" is rubbish, considering that you know your name...) + no need to ban the player, just a kick will do the trick since you might loose regular players. Also as you can see "if(!strcmp(name, "[SU]BP13", )" compares only 8 chars so it helps those "smarter exploiters" that might add another letter at the end(as for adding a letter infront of it... you gotta figure that out on your own).
Reply


Messages In This Thread
[UN SOLVED] Autokick wrong ip + name - by BP13 - 07.10.2009, 20:03
Re: Autokick wrong ip + name - by dice7 - 07.10.2009, 20:05
Re: Autokick wrong ip + name - by BP13 - 07.10.2009, 20:10
Re: Autokick wrong ip + name - by viKKmaN - 07.10.2009, 20:20
Re: Autokick wrong ip + name - by BP13 - 07.10.2009, 20:35
Re: Autokick wrong ip + name - by Hiitch - 07.10.2009, 21:20
Re: Autokick wrong ip + name - by BP13 - 07.10.2009, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)