SendClientMessage - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SendClientMessage (
/showthread.php?tid=460768)
SendClientMessage - Nicholas. - 29.08.2013
pawn Код:
if(!response)
{
SendClientMessage(playerid, -1, "You have quit from joining the server.");
Kick(playerid);
}
The script isn't reading the SendClientMessage function like this?
Re: SendClientMessage -
Areax - 29.08.2013
Try
this.
Re: SendClientMessage - Nicholas. - 29.08.2013
Oh, I see but is there any other work around besides using an include?
Re: SendClientMessage -
Edix - 29.08.2013
You can use a timer
Re: SendClientMessage -
SampGaming - 29.08.2013
Try this?
Код:
forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }
KickWithMessage(playerid, message[])
{
SendClientMessage(playerid, 0xFF4444FF, message);
SetTimerEx("KickPublic", 1000, 0, "d", playerid);
}
Created by Kalcor
Re: SendClientMessage -
EmilLykke - 29.08.2013
Use "KickWithMessage", as you can find when you go on ****** and search or "samp kick"
That means, that the kick is waiting a few moments, before it actually kicks the player.
Re: SendClientMessage -
ejb - 30.08.2013
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.");
}