AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Show players online using mysql (https://forums.alliedmods.net/showthread.php?t=178251)

wwzw 02-13-2012 09:41

Show players online using mysql
 
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!

Exolent[jNr] 02-13-2012 10:28

Re: Show players online using mysql
 
Well, it does make sense. You cannot disconnect from a server until you are in it.


All times are GMT -4. The time now is 00:21.

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