|
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:
0 a0 b+ A+ U4 k; P. s! k$ WCode:& y" h! [- _- n7 c* _
$mssql = mssql_query("SELECT * FROM [ACCOUNT_DBF].dbo.[ACCOUNT_TBL] WHERE isuse='J'");
( Q" z( D& ~3 I/ n% i1 iecho 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:8 A, A+ `% i' J, i. L# Z+ d6 @
Code:- b! [+ T; e. g6 b i9 P3 q
$mssql = mssql_query("SELECT * FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE MultiServer='1'");
/ W0 D- c [" Z8 m& Techo mssql_num_rows($mssql);! J/ N. h B" T( Q' f5 n$ R
G1 z# b% \' i% r |
|