Message isn't being send at kick. - 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: Message isn't being send at kick. (
/showthread.php?tid=344980)
Message isn't being send at kick. -
milanosie - 23.05.2012
Hello,
I have had this problem for a while now, but never bothered to look into it.
If someone is accountbanned or Character Killed on my server a variable in the playerfile will be set to 1.
At OnPlayerConnected I placed this code for if(CK == 1)
Код:
{
new string93[128];
format(string93,sizeof(string93), "%s just got kicked for (possibly) evading a ban!", pname);
SendClientMessageToAll(COLOR_RED, string93);
SCM(playerid, COLOR_ORANGE, "||==============================================================================||");
SCM(playerid, COLOR_RED, "You are banned from this server or recently had a name change!");
SCM(playerid, COLOR_RED, "If you think this is a mistake or you think you deserve to be unbanned,");
SCM(playerid, COLOR_RED, "Then you can fill in our form to get unbanned at the website www.RealityRp.net.");
SCM(playerid, COLOR_RED, "If this ban was a mistake, Then true sorry from our administrator team.");
SCM(playerid, COLOR_RED, "Sincerly, Milan_Huizen, Server Owner");
Kick(playerid);
}
The player does get kicked, and the 'string93' message is being send to everyone, but the other messages aren't.
I have this as SCM:
Код:
#define SCM SendClientMessage
What could be the problem here?
Re: Message isn't being send at kick. -
Vince - 23.05.2012
Kick has a higher priority than SendClientMessage. It should in theory send the messages first, though. A 20ms timer might suffice.
pawn Код:
forward @Kick(playerid);
@Kick(playerid) Kick(playerid);
pawn Код:
SetTimerEx("@Kick", 20, 0, "d", playerid);
Re: Message isn't being send at kick. -
milanosie - 23.05.2012
thanks,