• 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
525
Best answers
3
Reaction score
35
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:


Thanks for your time.
 
Last edited:

Leesne

Intermediate OT User
Joined
Dec 4, 2017
Messages
249
Best answers
30
Reaction score
120
Location
UK
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.
 
OP
DukeeH

DukeeH

Active Member
Joined
Dec 6, 2010
Messages
525
Best answers
3
Reaction score
35
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();
 

Leesne

Intermediate OT User
Joined
Dec 4, 2017
Messages
249
Best answers
30
Reaction score
120
Location
UK
No worries, DuleeH, hope it helps.. Good luck.
 

skovroski

New Member
Joined
Dec 23, 2019
Messages
29
Best answers
0
Reaction score
3
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?
 
Top