Jump to content

toberg

Members
  • Posts

    34
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by toberg

  1. Thanks, but this didn't helped. Gameserver start's with many error's, xxxxx can't find npc, spawntable etc, AI errors. Loginserver doesnt start... So my suggestion is the error is caused by eclipse. I mean eclipse didn't compiled source how it should. 

     

    28387542e156e7e3515ba0cce425add7998.png

  2. Ok, I see you didin't get it. Nevermind.

    Let's do it other way.

     

    <?php
    if(!defined('SYS_STARTED')) die('Security activated');
    
    $three_first_images = array(
    1 => "<img src='{$theme_path}/images/icons/gold_medal_small.png' style='margin-left: -5px;' alt=''>", 
    "<img src='{$theme_path}/images/icons/silver_medal_small.png' style='margin-left: -5px;' alt=''>", 
    "<img src='{$theme_path}/images/icons/bronze_medal_small.png' style='margin-left: -5px;' alt=''>"
    );
    $servers_list = array();
    
    $query = $db->prepare("SELECT *,rank FROM (
    SELECT @rank := IF(@prev_val=votes,@rank,@rank+1) AS rank, @prev_val := votes AS 
    votes, id, user_id, title, web_url, chronicle, xp, description, game_server_status, login_server_status
    FROM servers WHERE deleted = '0' ORDER BY votes DESC, last_vote_date DESC
    )as result LIMIT 5");
    $query->execute();
    
    if ($query->rowCount() > 0) {
    $i = 1;
    foreach ($query->fetchAll() as $key => $value) {
    	$rank = get_server_rank($value['user_id']);
    
    	$value['rank'] = (isset($three_first_images[$rank])) ? "<div class='server_rank_add'><strong>{$rank}</strong></div>" : "<div class='server_rank_add'>{$rank}</div>";
    	$value['short_title'] = truncate(strtolower($value['title']), 25);
    	$value['_id'] = $i;
    
    	$servers_list[] = $value;
    	++$i;
    }
    }
    
    $tpl->assign('servers_list', $servers_list);	
    $tpl->draw('top5');
    ?>

     

    This is code of Top_5.php.

    But when i go that file it says me "Security activated"... what should i do that top5 work?

  3. Hi guys. I really need your help.

    I have lineage 2 tops server www.top.la2tops.nbd.lt and i need add server "top5" in my ipb forum

     

    llb.lt have this plugin.

     

    HERE IS MY CODE:

     

    <?php
       $server_ip = "localhost";
       $mysql_user = "tralalal";
       $mysql_pass = "lalalala";
       $database = "lalalal";
       
       $connect = mysql_connect("$server_ip", "$mysql_user", "$mysql_pass");
       if(!$connect){
          die('Negaliu prisijungti:'. mysql_error());
       }
       $db_select = mysql_select_db("$database", $connect);
       if(!$db_select){
          die('Nerasta Duomenu baze:'. mysql_error());
       }
       
       $top = mysql_query("SELECT id, title, votes FROM servers ORDER BY votes DESC LIMIT 10");
       $pos = 0;
       echo"<table  cellspacing='5'  border='0'>";
       echo"<tr><td>Nr.</td><td>Taskai</td><td>Serveris</td></tr>";
       while($row=mysql_fetch_array($top)){
          $pvpkill = $row['title'];
          $nick = $row['votes'];
          $pos++;
          echo"<tr><td>$pos.</td><td>$nick</td><td>$pvpkill</td></tr>";
       }   
       echo"</table>";
       mysql_close($connect);
    ?>

     

    I modified it from top pvp .php script:D

    Only one problem. How to to that when some press on server name he goes to server website? :)

     

    Thanks.

     

    P.s I DONT WANT TO ADVERTISE SOMETHING HERE. JUST NEED HELP :)

  4. Wtf, i got error when i add

     

    return zone == ZONE_PVP ? _zones[ZONE_PVP] > 0 && ZONE_FLAG_PVP ? _zones[ZONE_FLAG_PVP] > 0 && _zones[ZONE_PEACE] == 0 : _zones[zone] > 0;

     

    And error marks return zone == ZONE_PVP ? _zones[ZONE_PVP] > 0 && ZONE_FLAG_PVP ? _zones[ZONE_FLAG_PVP] > 0 && _zones[ZONE_PEACE] == 0 : _zones[zone] > 0;

     

    How to fix this? :p

     

     

×
×
  • Create New...