IP name advertising - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IP name advertising (
/showthread.php?tid=253576)
IP name advertising -
HeLiOn_PrImE - 07.05.2011
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.
Re: IP name advertising -
Seven_of_Nine - 07.05.2011
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
Re: IP name advertising -
Seven_of_Nine - 07.05.2011
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);
}
Re: IP name advertising -
Lorenc_ - 07.05.2011
Put it on OnPlayerText Aswell, for spamming it.
Re: IP name advertising -
nuriel8833 - 07.05.2011
Quote:
Originally Posted by Lorenc_
Put it on OnPlayerText Aswell, for spamming it.
|
But they put the IP in their nickname..
Re: IP name advertising -
Lorenc_ - 07.05.2011
What i meant by that is if they say their server IP on the Chat aswell..
Re: IP name advertising -
HeLiOn_PrImE - 07.05.2011
thank you I will try it