SendClientMessage
#1

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?
Reply
#2

Try this.
Reply
#3

Oh, I see but is there any other work around besides using an include?
Reply
#4

You can use a timer
Reply
#5

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
Reply
#6

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.
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)