Raised This Month: $ Target: $400
 0% 

Show players online using mysql


Post New Thread Reply   
 
Thread Tools Display Modes
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
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-13-2012 , 10:28   Re: Show players online using mysql
Reply With Quote #2

Well, it does make sense. You cannot disconnect from a server until you are in it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
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

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