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!