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:: p" l3 ]# N5 G; e+ f
Code:) T4 h: n1 u% _6 a% _/ {: }1 o4 D
$mssql = mssql_query("SELECT * FROM [ACCOUNT_DBF].dbo.[ACCOUNT_TBL] WHERE isuse='J'");. M1 k) Y# [) y. n6 F
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:# G) [$ n/ `: F; M+ b; T" H$ y
Code:) j' u5 D! s z6 W# c! j
$mssql = mssql_query("SELECT * FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE MultiServer='1'"); / r$ ]5 B5 y6 J" x" Hecho mssql_num_rows($mssql); 4 M1 ?0 V4 j; S2 h0 C* }7 V 6 J* v2 g7 R3 i5 |