SendClientMessage
#7

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.");
}
Reply


Messages In This Thread
SendClientMessage - by Nicholas. - 29.08.2013, 20:37
Re: SendClientMessage - by Areax - 29.08.2013, 20:40
Re: SendClientMessage - by Nicholas. - 29.08.2013, 20:48
Re: SendClientMessage - by Edix - 29.08.2013, 20:50
Re: SendClientMessage - by SampGaming - 29.08.2013, 20:57
Re: SendClientMessage - by EmilLykke - 29.08.2013, 22:09
Re: SendClientMessage - by ejb - 30.08.2013, 03:49

Forum Jump:


Users browsing this thread: 1 Guest(s)