Kick mess whole public - 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: Kick mess whole public (
/showthread.php?tid=415904)
Kick mess whole public -
DRIFT_HUNTER - 15.02.2013
pawn Код:
forward BanCheck(query[], playerid, extraid, connectionHandle);
public BanCheck(query[], playerid, extraid, connectionHandle)
{
mysql_store_result();
if(mysql_num_rows())
{
mysql_fetch_row(query);
new Ban_Name[24], Ban_Reason[40], Ban_Time;
sscanf(query, "p<|>s[24]s[40]i", Ban_Name, Ban_Reason, Ban_Time);
if(Ban_Time <= 0)
{
SendClientMessageEx(playerid, red,"[Ban]: You have an existing ban from %s for %s!", Ban_Name, Ban_Reason);
}
else
{
SendClientMessageEx(playerid, red,"[Ban]: You have an existing ban from %s for %s it will expire in %d minutes!", Ban_Name, Ban_Reason, Ban_Time);
}
SendClientMessage(playerid, red, "You are banned!");
Kick(playerid);//My problem...
}
mysql_free_result();
return 1;
}
Problem is next: When i have that Kick(playerid), that whole public is just just messed up(just these one)...nothing is called except Kick... (I debugged it many times and im 100% sure that kick cause all)
If i remove that Kick all messages and debug messages (removed now) are called and everything is fine...
I also tried to call kick by SetTimer and everything was fine...
I also have some kick functions in script and they all work fine...
Im testing these on windows and server is 0.3x (but these already was my problem with 0.3e)
Public is called by mysql_query_callback function and i use R6 mysql plugin, mysql return's and fetch query fine and sscanf2 split it to variables (checked many times).
Re: Kick mess whole public -
Richie© - 15.02.2013
Try using KickPlayer(playerid); instead of Kick(playerid);
pawn Код:
stock KickPlayer(playerid)
{
SetTimerEx("KickPlayerNow", 700, false, "i", playerid);
return 1;
}
forward KickPlayerNow(playerid);
public KickPlayerNow(playerid)
{
return Kick(playerid);
}
Re: Kick mess whole public -
DRIFT_HUNTER - 15.02.2013
As i said, if i use SetTimer to call custom kick function than it work's fine.
I already found solution to problem, i just want to know WHY is these messing up with my public...
Re: Kick mess whole public -
DaRk_RaiN - 15.02.2013
Quote:
Originally Posted by DRIFT_HUNTER
i just want to know WHY is these messing up with my public...
|
It's the
Kick function
Quote:
Important Note: As of SA-MP 0.3x, any message sent to the player with SendClientMessage before Kick() will not be displayed for them.
|
Re: Kick mess whole public -
DRIFT_HUNTER - 15.02.2013
Thank you.
And for DEV tim, i think these its not since 0.3x cos i had these problem on 0.3e