Getplayername
#1

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

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

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

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
Reply
#5

Thanks mate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)