30.08.2013, 03:49
pawn Код:
//In order to display a message (eg. reason) for the player before the connection is closed you have to use a timer to create a delay. This delay needs only to be a few milliseconds long, but this example uses a full second just to be on the safe side.
forward KickPublic(playerid);
public KickPublic(playerid) Kick(playerid);
stock KickWithMessage(playerid, color, message[])
{
SendClientMessage(playerid, color, message);
SetTimerEx("KickPublic", 1000, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
}
//by Kye
pawn Код:
if(!response)
{
KickWithMessage(playerid, -1, "You have quit from joining the server.");
}

