Hello all, I am here to release a simple script I wrote from scratch for a server I work on.
It is just a list of names of all the current players online.
Save the following code into a file called onlineplayers.php
Set your mssql password and username and you are ready to go!Code:<?PHP //--Credits to Untamed AKA TimeBomb & Cabal Frontier: \\ $sql_server = "localhost"; //<-- MSSQL server address/ip $sql_user = "USER"; //<-- MSSQL username $sql_pass = "PASS"; //<-- MSSQL password $sql_data = "gamedb"; //<-- MSSQL database $conn=mssql_connect($sql_server,$sql_user,$sql_pass); $xadb = mssql_select_db($sql_data,$conn); $name1 = mssql_query("select [Name] from [dbo].[cabal_character_table] where login = 1"); $nametest = mssql_num_rows($name1); if ($nametest > 0) { echo '<center><b>Players Online:</b><p><i>'; do { while ($row = mssql_fetch_row($name1)) { echo $row[0].'<br>'; } } while (mssql_next_result($name1)); echo '</i></center>'; } else echo '<center><b>No players are currently online!</b></center>'; mssql_free_result($name1); mssql_close($conn); ?>
To make this work with Cabal Toolz:
Put this in your modules folder of your site.
Then, put a link somewhere on your site to http://YOURSITE.com/onlineplayers.html.
I put this link near the bottom of server check by editing the module mod.serverstats.php in the template folder.


Reply With Quote![Website Script of all online players. [Works with Cabal Toolz!]](http://ragezone.com/hyper728.png)

