gmstrikker
Well-Known Member
- Joined
- Jul 30, 2014
- Messages
- 458
- Solutions
- 1
- Reaction score
- 50
Wanted a way to when a player was online only appears the name on it in the online page list
if he did not have to HIDE, players who had to HIDE would appear PLAYER HIDE
I played a server called mastercores and was so loved that
onlinelist.php
myaccount.php
Where do I change to hide or non-hide:
myaccount.php (full script)
http://pastebin.com/uW6fZCTP
if he did not have to HIDE, players who had to HIDE would appear PLAYER HIDE
I played a server called mastercores and was so loved that
onlinelist.php
Code:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<h1>Who is online?</h1>
<?php
$array = online_list();
if ($array) {
?>
<table id="onlinelistTable" class="table table-striped table-hover">
<tr class="yellow">
<th>Name:</th>
<th>Guild:</th>
<th>Level:</th>
<th>Vocation:</th>
</tr>
<?php
foreach ($array as $value) {
$url = url("characterprofile.php?name=". $value['name']);
echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">';
echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>';
if (!empty($value['gname'])) echo '<td><a href="guilds.php?name='. $value['gname'] .'">'. $value['gname'] .'</a></td>'; else echo '<td></td>';
echo '<td>'. $value['level'] .'</td>';
echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
echo '</tr>';
}
?>
</table>
<?php
} else {
echo 'Nobody is online.';
}
?>
<?php include 'layout/overall/footer.php'; ?>
myaccount.php
Where do I change to hide or non-hide:
Code:
// Hide character
case 'toggle_hide':
$hide = (user_character_hide($char_name) == 1 ? 0 : 1);
if (user_character_account_id($char_name) === $session_user_id) {
user_character_set_hide(user_character_id($char_name), $hide);
}
break;
// end
http://pastebin.com/uW6fZCTP