29.08.2013, 20:37
pawn Код:
if(!response)
{
SendClientMessage(playerid, -1, "You have quit from joining the server.");
Kick(playerid);
}
if(!response)
{
SendClientMessage(playerid, -1, "You have quit from joining the server.");
Kick(playerid);
}
forward KickPublic(playerid); public KickPublic(playerid) { Kick(playerid); } KickWithMessage(playerid, message[]) { SendClientMessage(playerid, 0xFF4444FF, message); SetTimerEx("KickPublic", 1000, 0, "d", playerid); }
//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
if(!response)
{
KickWithMessage(playerid, -1, "You have quit from joining the server.");
}