Raised This Month: $ Target: $400
 0% 

[SOLVED]client_disconnect & mysql


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-06-2011 , 06:52   Re: [SOLVED]client_disconnect & mysql
Reply With Quote #6

Hmm, I think client_connect() triggers when player is accepted to server while in loading, but if the player cancells in loading the client_disconnect() doesn't trigger unless the player has entered the game.
So, if that's surely true , you should use client_putinserver() for adding to db.

You should test it tough, add server prints to console upon connect and disconnect, connect to the server and then cancel while loading.

And just a small note: about your team comment, are those numbers from their actual team (like [cs_]get_user_team) ? Because in-game, the spectators are team 3.


And about your updating stuff... where do you actually update the stats ? All I see is INSERT and DELETE... because if you're having trouble deleting that when player left, you can do it just fine in the update sequence, just check is_user_connected() (or better: a global variable) and check it before updating then delete player and skip to next one.

And if you don't have a updating sequence already, set_task() on 5-30 seconds will do just fine.
__________________

Last edited by Hunter-Digital; 05-06-2011 at 06:59.
Hunter-Digital is offline
 



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

Forum Jump


All times are GMT -4. The time now is 04:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode