IP name advertising
#1

In the last few days I got a lot of players that advertise by puting the server IP on their nickname. is there a fs to stop this? Don't tell me to make it by miself, I would if I knew how to do it.
Reply
#2

Search: strfind()
I think you should check if the player has more than 3 or 4 numbers in his name. (and a dot too.)
If yes, kick
Reply
#3

Under OnPlayerConnect:
pawn Код:
new numbers, lenght, dot, dot2, name[30];
    GetPlayerName(playerid,name,sizeof(name));
    lenght = strlen(name);
    for(new i = 0; i < lenght; i++) {
        if(IsNumeric(name[i])) {
            numbers++;
        }
        if(strcmp(name[i],".",true) == 0) {
            dot++;
        }
        if(strcmp(name[i],":",true) == 0) {
            dot2++;
        }
    }
    if(numbers >= 5 && dot > 0 && dot2 >= 0) {
        return Kick(playerid);
    }
Reply
#4

Put it on OnPlayerText Aswell, for spamming it.
Reply
#5

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Put it on OnPlayerText Aswell, for spamming it.
But they put the IP in their nickname..
Reply
#6

What i meant by that is if they say their server IP on the Chat aswell..
Reply
#7

thank you I will try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)