Zoe Skandinavia
Member
- Joined
- Jul 18, 2014
- Messages
- 193
- Solutions
- 2
- Reaction score
- 15
Hi!, i'm trying to put a reset system, it's already done but i want to put in highscores and onlinelist how many resets have a player. The count is on a storage and this is my code in highscores.php but i need get the player name and i don't know how.
PD: The problem is on: $playerID
I tried everything but i doesn't works. Please Help!.
PD: The problem is on: $playerID
PHP:
<table id="highscoresTable" class="table table-striped table-hover">
<tr class="yellow">
<td>Rank</td>
<td>Name</td>
<td>Vocation</td>
<td>Level</td>
<?php if ($type === 7) echo "<td>Points</td>"; ?>
<td>Resets</td>
</tr>
<?php
for ($i = 0; $i < count($scores[$type]); $i++) {
if (pageCheck($i, $page, $rowsPerPage)) {
$playerID = mysql_select_single("SELECT `id` FROM `players` WHERE `name` = '".I DONT KNOW WHAT TO PUT HERE TO GET THE PLAYER NAME."';");
$resets = mysql_select_single("SELECT `value` FROM `player_storage` WHERE (`key` = 86228 AND `player_id` = '". $playerID['id'] ."');");
if ($resets['value'] == -1) { $reset = "0"; }
elseif ($resets['value'] == 1) { $reset = "1"; }
elseif ($resets['value'] == 2) { $reset = "2"; }
else { $reset = "Unknown"; }
?>
<tr>
<td><?php echo $i+1; ?></td>
<td><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></td>
<td><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></td>
<td><?php echo $scores[$type][$i]['value']; ?></td>
<?php if ($type === 7) echo "<td>". $scores[$type][$i]['experience'] ."</td>"; ?>
<td><?php echo $reset; ?></td>
</tr>
<?php
}
}
?>
</table>
I tried everything but i doesn't works. Please Help!.