Raised This Month: $ Target: $400
 0% 

Show players online using mysql


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wwzw
Member
Join Date: Feb 2009
Old 02-13-2012 , 09:41   Show players online using mysql
Reply With Quote #1

I want to use the mysql database to save the online players.
Like this:
PHP Code:
public client_connect(id)
{
    
// REPLACE INTO `cs_online`........
}
 
public 
client_putinserver(id)
{
    
// UPDATE `cs_online` SET........
}
 
public 
client_disconnect(id)
{
    
// DELETE FROM `cs_online` WHERE `id` = id

But there is a bug:
When a player disconnected at connecting,
Does not remove the online data .

How can I know this player has been disconnected, or downloading files ?

Please help me , Thanks!
wwzw 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 00:21.


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