• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC MyAAC - Show outfit on Highscore box

DukeeH

Active Member
Joined
Dec 6, 2010
Messages
550
Solutions
3
Reaction score
39
Hello, I'm looking for a way to show player's outfit on highscore box using MyAAC (0.8-dev).
Used to use Gesior, changed the code a bit but it's not working

Code:
       <img src="http://outfit-images.ots.me/outfit.php?id='.$player['looktype'].'&amp;addons='.$player['lookaddons'].'&amp;head='.$player['lookhead'].'&amp;body='.$player['lookbody'].'&amp;legs='.$player['looklegs'].'&amp;feet='.$player['lookfeet'].'" width="32" height="32">

highscores.php: [PHP] highscores - Pastebin.com

What it is showing:
unknown.png


Thanks for your time.
 
Last edited:
Solution
function.lua
getTopPlayers doesn't select all the player information

Replace
Lua:
$players = $db->query('SELECT `id`, `name`, `level`, `experience`' . ($is_tfs10 ? '' : ', `online`') . '

With:
Lua:
$players = $db->query('SELECT `id`, `name`, `level`, `experience`,`looktype`,`lookaddons`,`lookhead`,`lookbody`,`looklegs`,`lookfeet`' . ($is_tfs10 ? '' : ', `online`') . '

There is more code after that so don't replace the whole line.. just the exact code above.
function.lua
getTopPlayers doesn't select all the player information

Replace
Lua:
$players = $db->query('SELECT `id`, `name`, `level`, `experience`' . ($is_tfs10 ? '' : ', `online`') . '

With:
Lua:
$players = $db->query('SELECT `id`, `name`, `level`, `experience`,`looktype`,`lookaddons`,`lookhead`,`lookbody`,`looklegs`,`lookfeet`' . ($is_tfs10 ? '' : ', `online`') . '

There is more code after that so don't replace the whole line.. just the exact code above.
 
Solution
Thanks.

www/system/functions.php
At line 993:
Code:
        $players = $db->query('SELECT `id`, `name`, `level`, `experience`,`looktype`,`lookaddons`,`lookhead`,`lookbody`,`looklegs`,`lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . $config['highscores_groups_hidden'] . ' AND `id` NOT IN (' . implode(', ', $config['highscores_ids_hidden']) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();
 
Thanks.

www/system/functions.php
At line 993:
Code:
        $players = $db->query('SELECT `id`, `name`, `level`, `experience`,`looktype`,`lookaddons`,`lookhead`,`lookbody`,`looklegs`,`lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . $config['highscores_groups_hidden'] . ' AND `id` NOT IN (' . implode(', ', $config['highscores_ids_hidden']) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();

this configuration on the current myaac takes?
 
Back
Top