07.05.2011, 07:36
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.
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);
}