|
|
In the past I've seen various ways of checking the current number of online players, but all that I've seen have a fatal flaw. Depending on how the server was turned off (or more specifically, if it crashes) the player count gets messed up. Here's the one I'm talking about:. f" C2 N X& i$ H
Code:
9 {" K9 x* G- M$mssql = mssql_query("SELECT * FROM [ACCOUNT_DBF].dbo.[ACCOUNT_TBL] WHERE isuse='J'");. Z! b) j! V% Z0 u: g* ^. U3 N8 S
echo mssql_num_rows($mssql);Here's a more proper code, which will automatically reset the current online count whenever the world server program is opened:& u/ J# T9 x; e$ ]7 f+ a
Code:, ^/ s9 f8 \6 ^5 n p+ j+ o- |" }
$mssql = mssql_query("SELECT * FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE MultiServer='1'");
2 s' \! _/ I* techo mssql_num_rows($mssql);
+ D u' k4 d3 _6 y. K2 M8 X2 e# Q- `1 }% d3 [$ b
|
|