2
« on: April 30, 2012, 02:26:27 pm »
[pawn]
public IsInvalidChar( c[ ] )
{
if (strfind(c, "*", true) != -1 ||
strfind(c, "?", true) != -1 ||
strfind(c, ">", true) != -1 ||
strfind(c, "<", true) != -1 ||
strfind(c, "ยก", true) != -1 ||
strfind(c, "/", true) != -1) return 1;
if (isNumeric(c)) return 1;
else return 0;
return 1;
}
public NickPlayerChar(playerid)
{
if(IsInvalidChar(PlayerName(playerid))) {
new str[256];
format(str,256,"*Auto-kick %s reason: [Invalid Nick-name]", PlayerName(playerid));
SendClientMessageToAll(RED,str);
Kick(playerid);
}
}
stock PlayerName(playerid)
{
new name[24];
GetPlayerName(playerid,name,24);
return name;
}
[/pawn]
[pawn]
public OnPlayerConnect(playerid)
{
NickPlayerChar(playerid);
return 1;
}
[/pawn]
made by Madara