Code:
public OnPlayerConnect(playerid)
{
new str[256];
if(strfind(pName(playerid),"[AG]", true) != -1)
{
if(PlayerInfo[playerid][Level] == 0)
{
format(str, sizeof(str), "%s {%d} has been kicked for having [AG] clan-tag in their name.", pName(playerid), playerid);
SendClientMessageToAll(-1, str);
KickPlayer(playerid);
return 1;
}
}
return 1;
}
stock pName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
stock KickPlayer(playerid) return SetTimerEx("KickPlayerEx", 100, false, "i", playerid);
function KickPlayerEx(playerid) return Kick(playerid);
Quote:
if(PlayerInfo[playerid][Level] == 0) |