Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Website Script of all online players. [Works with Cabal Toolz!]

Joined
May 23, 2008
Messages
1,071
Reaction score
574
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
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);
?>

Set your mssql password and username and you are ready to go!

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 .
I put this link near the bottom of server check by editing the module mod.serverstats.php in the template folder.
 
Last edited by a moderator:
Joined
May 23, 2008
Messages
1,071
Reaction score
574
Just searched ;) There is nothing like this, unless you count CabalToolz online number of players. This is a full list of online players names. I did search these forums before I made this, and just now, and nothing like this showed up.
This code personally was also never released, I just coded it today...
 
Back
Top