19.07.2010, 01:58
Instead of a million strfinds, why not do this?
I don't get why you're using strfind to get someone's banned name. You're just finding a word inside of it, the point was to forbid the name.
pawn Code:
new ForbiddenNames[][] = {
"Loser", "Noob", "Admin", "Moderator", "VIP"
};
public OnPlayerConnected(playerid) {
for(new i = 0; i < sizeof(ForbiddenNames); i ++ ) {
if(!strcmp(name, i, true)) {
SendClientMessage(playerid, 0xFF0000FF, "SERVER: That name is not allowed here!");
SendClientMessage(playerid, 0xFF0000FF, "SERVER: You have kicked");
Kick(playerid);
}
}
return 1;
}

