17.07.2016, 14:54
How to make if player name Contains "BROOK"
kick him ?
kick him ?
//OnPlayerConnect
new
l_t_name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, l_t_name, MAX_PLAYER_NAME);
if( strfind(l_t_name, "BROOK", true) != -1 ) return Kick(playerid);
IsValidName(playerid)
{
new
l_t_name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, l_t_name, MAX_PLAYER_NAME);
if( strfind(l_t_name, "BROOK", true) != -1 ) return false;
else if( strfind(l_t_name, "HOREEH", true) != -1 ) return false;
else if( strfind(l_t_name, "FOO", true) != -1 ) return false;
else if( strfind(l_t_name, "BAR", true) != -1 ) return false;
return true;
}
// onplayerconnect
if(!IsValidName(playerid)) return Kick(playerid);