• 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 Death List

Pedrook

Advanced OT User
Joined
May 24, 2009
Messages
442
Solutions
3
Reaction score
183
Location
Brazil
When the player has 1 death, it is normal as in the picture.
Now when he has two, it stays that way. I already tried to add <table> however, the time does not work, only the deaths appear.


SC90mVr.png

9Po89S9.png

PHP:
    $deads = 0;
        //deaths list
        $player_deaths = new DatabaseList('PlayerDeath');
        $player_deaths->setFilter(new SQL_Filter(new SQL_Filter(new SQL_Field('player_id'), SQL_Filter::EQUAL, $player->getId()), SQL_Filter::CRITERIUM_AND,new SQL_Filter(new SQL_Field('id', 'players'), SQL_Filter::EQUAL, new SQL_Field('player_id', 'player_deaths'))));
        $player_deaths->addOrder(new SQL_Order(new SQL_Field('time'), SQL_Order::DESC));
        $player_deaths->setLimit(20);

        foreach($player_deaths as $death)
        {

            $deads++;
            $dead_add_content .= "<tr><td width=\"20%\" align=\"center\"></td><td>Died at level " . $death->getLevel() . " by " . $death->getKillerString();
            if($death->getMostDamageString() != '' && $death->getKillerString() != $death->getMostDamageString())
                $dead_add_content .= ' and ' . $death->getMostDamageString();
            $dead_add_content .= "</td></tr>";
        }

        if ($deads > 0)
            $main_content .= '<div class="block">
                                <div class="block-header bg-gray-lighter">
                                    <ul class="block-options">
                                        <li>
                                            <button type="button" data-toggle="block-option" data-action="fullscreen_toggle"></button>
                                        </li>
                                        <li>
                                            <button type="button" data-toggle="block-option" data-action="refresh_toggle" data-action-mode="demo"><i class="si si-refresh"></i></button>
                                        </li>
                                    </ul>
                                    <h3 class="block-title"><h3 class="panel-title">Deads</h3>
                                </div>
                                <div class="block-content">
                                    <ul class="list list-timeline pull-t">
                                        <li>
                                            <div class="list-timeline-time">'.date("j M  H:i", $death->getTime()).'</div>
                                            <i class="si si-ghost list-timeline-icon bg-default"></i>
                                            <div class="list-timeline-content">' . $dead_add_content . '</div>
                                        </li>
                                </div>
                            </div>';

note that I've removed the schedule from here so I can "$dead_add_content .= "<tr><td width=\"20%\" align=\"center\"></td><td>Died at level " .
detach it because I could not add every 1 in a part

ltjc3jy.png
 
PHP:
$dead_add_content .= "<tr><td width=\"20%\" align=\"center\"></td><td>Died at level" . $death->getLevel() . " by " . $death->getKillerString();

At the end add <br>
 
PHP:
$dead_add_content .= "<tr><td width=\"20%\" align=\"center\"></td><td>Died at level" . $death->getLevel() . " by " . $death->getKillerString();

At the end add <br>
it worked, now it is breaking the line, but still only appears 1 hour of death, how do I add 1 schedule for each death?

fibyeBi.png
 
(I cannot copy its add dots.) There is one loop "foreach" and ones "{ }".

Move on "}" at the end of the code then it will be concerning the whole code.
 
Back
Top