[Help] Kicking a player
#1

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

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

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

Bump...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)