1
[Web] [Ayuda] Modern Acc Show Outfits Highscore y Online Players Mar Sep 05, 2023 8:50 am
rellanolol

Miembro

Hola me gustaria que me ayudasen con un codigo de mi web, actualmente estoy trabajando en Modern Acc, me gustaria que al momento entrar Highscore o Rank saliera al lado de cada player su outfits cuando pongo player online lo mismo y tambien quisiera que funcione el boton de ordenar segun por nombre, vocacion o level que no funciona en online player.
Aqui les dejo el codigo de mi Highscore.php:
Aqui les dejo el codigo de mi Online_Players.php:
Espero me puedan ayudar, Un saludo.
Aqui les dejo el codigo de mi Highscore.php:
- Spoiler:
- <?php
require("config.php");
$ide = new IDE;
try {$ide->loadInjections("highscores");} catch(Exception $e) {error($e->getMessage()); }
echo form_open('highscores');
$uri = $this->uri->segment(5) ? $this->uri->segment(5) : 0;
if(count($config['worlds']) > 1) {
echo "<b>World</b> ";
echo "<select name='world'>";
foreach($config['worlds'] as $id=>$name) {
if($_POST['world'] == $id)
echo "<option selected='true' value='$id'>$name</option>";
else
echo "<option value='$id'>$name</option>";
}
echo "</select>";
}
echo "<table border='2' style='font-size:17px' width='100%' align='Center' bordercolor='#73aa05' cellspacing='0' cellpadding='0'><tr><td><center><b>Puntuacion de ". (is_numeric($type) ? $skills[$type] : $type) ." en ".$config['worlds'][$world]."</td></tr></center></table>";
echo "<div class='info'>";
echo "<table border='1' style='font-size:15px' width='100%' align='Center' bordercolor='#73aa05' cellspacing='0' cellpadding='0'><tr><td><center><b>Puntuacion de: <select name='skill'></b></center>";
echo "<option class='skill' ".set_select('skill', 1, true)." value='Level'>Experience</option>";
echo "<option class='skill' ".set_select('skill', 9)." value='Magic Level'>Magic Level</option>";
echo "<option class='skill' ".set_select('skill', 2)." value='1'>Fist fighting</option>";
echo "<option class='skill' ".set_select('skill', 3)." value='2'>Club fighting</option>";
echo "<option class='skill' ".set_select('skill', 4)." value='3'>Sword fighting</option>";
echo "<option class='skill' ".set_select('skill', 5)." value='4'>Axe fighting</option>";
echo "<option class='skill' ".set_select('skill', 6)." value='5'>Distance fighting</option>";
echo "<option class='skill' ".set_select('skill', 7)." value='6'>Shielding</option>";
echo "<option class='skill' ".set_select('skill',." value='7'>Fishing</option>";
echo "</select>";
echo "<input type='submit' value='Ver' style='font-size:15px' ></td></tr></table>";
echo "</form>";
$i = 1 + $uri;
echo "<table border='1' style='font-size:15px' width='100%' align='Center' bordercolor='#73aa05' cellspacing='0' cellpadding='0'>";
if(is_numeric($type)) {
echo "<tr><td><b><center>*</center></b></td><td><center><b>Nombre</b></center></td><td><center><b>Skill</b></center></td></tr>";
foreach($players as $player) {
if(in_array($player['name'], $config['newchar_vocations'][0])) continue;
echo '<tr><td align="center">'.$i.'</center></td><td align="center"><a href="'.WEBSITE.'/index.php/character/view/'.$player['name'].'" class="'. ($player['online'] ? 'green' : 'red') .'">'.$player['name'].'</a></td><td align="center">'.$player['value'].'</td></tr>';
$i++;
}
}else{
switch($type) {
case 'Level':
echo "<tr><td><b><center>*</center></b></td><td><center><b>Nombre</b></center></td><td><center><b>Exp</b></center></td><td><center><b>Level</b></center></td></tr>";
foreach($players as $player) {
if(in_array($player['name'], $config['newchar_vocations'][0])) continue;
echo '<tr><td align="center">'.$i.'</td><td align="center"><a href="'.WEBSITE.'/index.php/character/view/'.$player['name'].'" class="'. ($player['online'] ? 'green' : 'red') .'">'.$player['name'].'</a></td><td align="center">'.$player['experience'].'</td><td align="center">'.$player['level'].'</td></tr>';
$i++;
}
break;
case 'Magic Level':
echo "<tr><td><b><center>*</center></b></td><td><center><b>Nombre</b></center></td><td><center><b>Level</b></center></td></tr>";
foreach($players as $player) {
if(in_array($player['name'], $config['newchar_vocations'][0])) continue;
echo '<tr><td align="center">'.$i.'</td><td align="center"><a href="'.WEBSITE.'/index.php/character/view/'.$player['name'].'" class="'. ($player['online'] ? 'green' : 'red') .'">'.$player['name'].'</a></td><td align="center">'. $player['maglevel'] .'</td></tr>';
$i++;
}
break;
}
}
echo "</table>";
echo $this->pagination->create_links();
echo "</div>";
?>
Aqui les dejo el codigo de mi Online_Players.php:
- Spoiler:
- <div class='message'>
<div class='title'><font size="3" color="White">Players Online</font></div></div>
<div class='content'>
<?php
global $config;
require("system/application/config/create_character.php");
$GLOBALS['players'] = $players;
echo '<br /><div align="center">';
@$_world = (int)$_REQUEST['world'];
if(!@$config['servers'][$_world]['vapusid'])
echo @"Please edit your config.php:<br /><span style=\"font-size: 8px\">\$config['servers'][{$_world}]['vapusid'] = ID; // Replace ID with the server id from VAPus.net<br />
To get the ID just register and click on the server the last number in the URL is your ID (/otlist.serv/10 means ID = 10)
</span>";
else
echo "</div><br />";
$ide = new IDE;
try { $ide->loadInjections("players_online"); } catch(Exception $e) { error($e->getMessage()); }
echo form_open("character/online", array('method'=>'POST'));
if(count($config['worlds']) > 1) {
echo "<b>World </b> <select name='world'>";
echo "<option value=''>All</optino>";
foreach($config['worlds'] as $key=>$value) {
echo "<option ".set_select('world', $key)." value='$key'>$value</option>";
}
echo "</select> ";
}
echo "<table border='2' style='font-size:17px' width='100%' align='Center' bordercolor='#73aa05' cellspacing='0' cellpadding='0'><tr><td><center><b>Buscar por </b> <select name='sort'>";
echo "<option value=''>Seleccionar</option>";
echo "<option ".set_select('sort', 'level')." value='level'>Level</option>";
echo "<option ".set_select('sort', 'Vocation')." value='vocation'>Vocacion</option>";
echo "<option ".set_select('sort', 'name')." value='name'>Nombre</option>";
echo "</select>";
echo " <input type='submit' value='Ordenar' style='font-size:15px' ></td></tr></table>";
echo "</form>";
echo "</form>";
if(count($players) > 0) {
echo "<table border='2' style='font-size:17px' width='100%' align='left' bordercolor='#73aa05' cellspacing='0' cellpadding='0'>";
echo "<tr><td><center><b>Nombre</b></center></td><td><center><b>Level</b></center></td><td><center><b>Vocacion</b></center></td><td><center><b>World</b></center></td></tr>";
foreach($players as $row) {
if(in_array(strtolower($row['name']), $config['restricted_names'])) continue;
echo "<tr><td><center><a href=\"../character/view/".$row['name']."\">".$row['name']."</a></center></td><td><center>".$row['level']."</center></td><td><center><a href=\"/DBO/system/pages/vocaciones/".getVocationName($row['vocation'], $row['promotion']).".php\">".getVocationName($row['vocation'], $row['promotion'])."</center></td><td><center>".$config['worlds'][$row['world_id']]."</center></td></tr>";
}
echo "</table>";
}
if(count($players) < 1) {
echo "<table border='2' style='font-size:17px' width='100%' align='left' bordercolor='#73aa05' cellspacing='0' cellpadding='0'>";
echo "<tr><td><center><b>Ahora no hay players online.</b></center></td>";
echo "</table>";
}
?>
</div>
- Spoiler:
- <IMG SRC="/DBO/public/outfits/<?php echo $player->getLooktype(); ?>_2_0_0.png">
Espero me puedan ayudar, Un saludo.