[Help] Kicking a player - 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: [Help] Kicking a player (
/showthread.php?tid=388083)
[Help] Kicking a player -
Maxips2 - 27.10.2012
I'm having a problem with kicking a player from the server (using Kick(playerid)) when using it on a custom callback.
I am using BlueG's MySQL Plugin R7 and one of my queries is supposed to check if a player is banned.
If the result is true then the player will be kicked from the server.
The result is being called on a custom callback (threaded queries) and when using kick it's acting very wierd: the player is losing connection (not "server has closed the connection.") and he isn't getting any client messages which should've been sent before the kick.
EDIT: just noticed I posted this in the wrong section, my bad. Can someone move it to scripting help?
Re: [Help] Kicking a player -
playbox12 - 27.10.2012
Solution: Do not kick the player under OnPlayerConnect it'll not show messages 9/10. (either use a timer to delay it a few seconds or call it at OnPlayerRequestClass).
Re: [Help] Kicking a player -
Maxips2 - 27.10.2012
It's not on OnPlayerConnect.
When OnPlayerConnect calls, it sends a query and then calls another callback which has the result from mysql and only then the player is being kicked.
Re: [Help] Kicking a player -
Maxips2 - 28.10.2012
Bump...