SA-MP Forums Archive
Getplayername - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Getplayername (/showthread.php?tid=309765)



Getplayername - Twinki1993 - 09.01.2012

Well I am interested how do I make for example if players name has some offensive word he will get kicked.


Re: Getplayername - [ABK]Antonio - 09.01.2012

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name, "fuck", true) != -1)
{
    Kick(playerid);
}
Maybe something like that


Re: Getplayername - Twinki1993 - 09.01.2012

Yeah, thanks, but how I add that for multiple words, and where do I actually place that


Re: Getplayername - [ABK]Antonio - 09.01.2012

Quote:
Originally Posted by Twinki1993
Посмотреть сообщение
Yeah, thanks, but how I add that for multiple words, and where do I actually place that
on OnPlayerConnect

The way i know would work is to do more if statements...replacing "fuck" with a different word, there's probably a better way to do it...something comes to mind but i'm not sure if it would work

EDIT: looking down a few posts....http://forum.sa-mp.com/showpost.php?...postcount=1071


Re: Getplayername - Twinki1993 - 09.01.2012

Thanks mate!