|
|
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:: `) B1 P: t* b
Code:( `8 a: u3 m; E9 T( g
$mssql = mssql_query("SELECT * FROM [ACCOUNT_DBF].dbo.[ACCOUNT_TBL] WHERE isuse='J'");
1 f, f. s! H# z& L$ M# `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:" C5 k( i @0 Z, Z0 k' E' z
Code:
) k- m9 C3 _, e* P# C# c$mssql = mssql_query("SELECT * FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE MultiServer='1'");8 J1 G- m! g, ^$ Z- R8 a
echo mssql_num_rows($mssql);
1 K4 w/ Q& w" N+ ^
! e9 ?) s' d: p2 x F: a! }- f1 x7 n |
|