SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/10/2012, 12:52 PM   #1
Maxips2
Huge Clucker
 
Join Date: Oct 2008
Posts: 410
Reputation: 20
Default [Help] Kicking a player

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?
Maxips2 is offline   Reply With Quote
Old 27/10/2012, 12:56 PM   #2
playbox12
High-roller
 
playbox12's Avatar
 
Join Date: Feb 2010
Location: Netherlands
Posts: 1,317
Reputation: 216
Default Re: [Help] Kicking a player

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).
playbox12 is offline   Reply With Quote
Old 27/10/2012, 01:01 PM   #3
Maxips2
Huge Clucker
 
Join Date: Oct 2008
Posts: 410
Reputation: 20
Default Re: [Help] Kicking a player

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.
Maxips2 is offline   Reply With Quote
Old 28/10/2012, 11:49 AM   #4
Maxips2
Huge Clucker
 
Join Date: Oct 2008
Posts: 410
Reputation: 20
Default Re: [Help] Kicking a player

Bump...
Maxips2 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kicking player during... P<3TS Scripting Help 13 03/08/2012 06:45 AM
Kicking an NPC RedFusion Scripting Help 2 18/07/2012 06:48 PM
Not kicking player from vehicle? Torran Help Archive 8 10/03/2010 03:32 PM
Kicking with YSI KnooL Help Archive 16 09/12/2009 05:41 AM


All times are GMT. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.