19.05.2017, 10:32
Make a timer before kicking the player, like this:
PHP код:
#define DelayKick(%0) SetTimerEx("DelayedKick", 300, 0, "d", %0)
forward DelayedKick(playerid);
public DelayedKick(playerid)
{
Kick(playerid);
return 1;
}
stock NameCheck(playerid)
{
new str[128];
new namecheck = strfind(GetName(playerid), "_", true);
if(namecheck >= 1)
{
SendClientMessage(playerid, COLOR_RED, "On United County Roleplay we operate a 'Master Account' system. In order to register an account you will need to join with a nickname(without the '_'), instead of your roleplay name.");
format(str, sizeof(str), "%s was kicked by the server for joining with a roleplay name.",GetName(playerid));
SendAdminsMessage(1, COLOR_ORANGERED, str);
DelayKick(playerid);
}
return 1;
}