Jump to content
  • 0

Putting Server Highest Peak


Question

9 answers to this question

Recommended Posts

Posted

OnPcLoginEvent:
if(getusers(1) > $onlinerecord) {
   set $onlinerecord,getusers(1);
}

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query("SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = '$onlinerecord' LIMIT 1");
$res= mysql_fetch_row($res);

echo 'Record online:'. $res;
?>

The rest is up to you.

Posted

All you need is to echo the $res in the website, and configure the :

mysql_connect('ip', 'user', 'password');

mysql_select_db('ragnarok_database');

AND

put that npc script in the server.

Posted

I'm having errors. Can you help me?

Notice: Undefined variable: onlinerecord in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 4
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5
Record online:

Posted (edited)

Ops.. Try this code.

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = \'$onlinerecord\' LIMIT 1');
$res = mysql_fetch_row($res);

echo 'Record online:'. $res;
?>

Edited by Tribbiani
Posted

One more error...

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5

Record online:

Posted (edited)

One more error...

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5

Record online:

kinda rusty here.. anyways..

use this... it was varname not str ><.

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `varname` = \'$RecordOnline\' LIMIT 1');
$res = mysql_fetch_row($res);

echo 'Record online:'. $res[0];
?>

Edited by Tribbiani
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...