TM-FORUM

The TrackMania universal forum ^_^
It is currently Fri Oct 24, 2014 1:21 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Sun Jan 31, 2010 3:23 am 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: Thu May 08, 2008 12:25 pm
Posts: 230
Location: The Netherlands
Owned TM-games: All but original
Hi all,

I found that the times displayed horizontally with the checkpoints below where so much apart, it took me to long time to compare cp's with my opponents. I have added a new funtion which displays the round times below each other ans the cp's from left to right. (see screenshot)
Image

Added in plugins.bestruns.php :
Code:
      elseif ($orientation == 4){
         display_best_runs_v4($aseco);
      }

and:
Code:
function display_best_runs_v4($aseco){ // affiche les best runs | Modified by weerwolf 30.01.2010
   global $tab_meilleurs_temps;
   $config = simplexml_load_file('bestruns.xml');
   //==================
   //print_r($config);
   //print_r($tab_meilleurs_temps);
   
   $posx_frame = $config->position->x; //main x position of the widget
   $posy_frame = $config->position->y; //main y position of the widget
   $nb_temps_cp = $config->checkpoints->nb_bestruns_with_cp;
   $nb_cp_temps = $config->checkpoints->nb_max_checkpoints;
   $texte;
   $min=0;
   $sec=0;
   $cen=0;
   $i = 0;
   $place = 1;
   
   $posx;   
   
   $xml='<?xml version="1.0" encoding="UTF-8"?>';
   $xml.='<manialink id="342312">';
   $xml.='<frame posn="' .$posx_frame. ' ' .$posy_frame. '">';
   $xml.='<format textsize="1"/>';
   
   foreach($tab_meilleurs_temps as $info){ //pour chaque enregistrement
      
      $min = (int) (($info->temps) / 60000);
      $sec = (int) ((($info->temps) - $min * 60000) / 1000);
      $cen = (int) (($info->temps - $min*60000 - $sec*1000) / 10);
      $texte ="$z$place. $0f9";
      $texte .= "$min:";
      if ($sec < 10) $texte .= "0";   
      $texte .= $sec.'.';
      if ($cen < 10) $texte .= "0";
      $texte .= $cen;
      
      $posy = $i * (-2);
      $xml.='<quad  posn="0 ' .$posy. '" sizen="14 2.2" halign="center" valign="center" style="Bgs1InRace" substyle="NavButton" />';
      $posy = $posy+0.1;
      $xml.='<label posn="-6.2 ' .$posy. '" sizen="6.5 2" halign="left" valign="center" text="'.$texte.'"/>';
      $xml.='<label posn="-0.4 ' .$posy. '" sizen="6.5 2" halign="left" valign="center" text="'.$info->nickname.'"/>';
      if ($i < $nb_temps_cp){ // affiche les checkpoints de chaque temps
         $ii = 0;
         foreach ($info->checks as $cp){
            if ($ii < $nb_cp_temps){
               $minn = (int) (($cp) / 60000);
               $secc = (int) ((($cp) - $minn * 60000) / 1000);
               $cenn = (int) (($cp - $minn*60000 - $secc*1000) / 10);
               $textee ="$z$fff";
               $textee .= "$minn:";
               if ($secc < 10) $textee .= "0";   
               $textee .= $secc.'.';
               if ($cenn < 10) $textee .= "0";
               $textee .= $cenn;
               $posx = 9.5 + ($ii * (5.2));
               $xml.='<quad  posn="' .$posx. " " .$posy. '" sizen="5.5 2.2" halign="center" valign="center" style="Bgs1InRace" substyle="NavButton" />';
               $xml.='<label posn="' .$posx. " " .$posy. '" sizen="5.5 2" halign="center" valign="center" text="'.$textee.'"/>';
               $ii++;
            }else{
               break;
            }
         }
      }
      $i++;
      $place++;
   }
   
   $xml.='</frame></manialink>';
   $aseco->client->query("SendDisplayManialinkPage", $xml, 0, false); //requete d'affichage
}


Hope you can use it ;)

_________________
LYNX°°°° - Maniaplanet Gaming Community!
news | clan | community | & more
°°°°


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Sun Feb 21, 2010 9:31 pm 
Offline
cyclist
cyclist

Joined: Sat Jun 13, 2009 2:54 pm
Posts: 48
Owned TM-games: TMUF
Last Revision (21/02/2010) :

V1.1 :
http://www.sendspace.com/file/j77ylv

_________________
Galaad, le chevalier au coeur pur


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Sun Feb 21, 2010 11:37 pm 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: Thu May 08, 2008 12:25 pm
Posts: 230
Location: The Netherlands
Owned TM-games: All but original
Ok..... Was the idea above so awful that you even did not try to give a comment of it and considering adding it to updates? :ftw:

_________________
LYNX°°°° - Maniaplanet Gaming Community!
news | clan | community | & more
°°°°


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon Feb 22, 2010 11:57 am 
Offline
Pit Crew
Pit Crew

Joined: Sun Aug 19, 2007 3:58 pm
Posts: 5471
Owned TM-games: TMN, TMU, TMF, TM²
afisse wrote:
Last Revision (21/02/2010) :
V1.1 :
http://www.sendspace.com/file/j77ylv

You seem to have forgotten to include the Readme file that was in the previous version of the zip.

_________________
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon Mar 01, 2010 11:59 am 
Offline
cyclist
cyclist

Joined: Sat Jun 13, 2009 2:54 pm
Posts: 48
Owned TM-games: TMUF
weerwolf1 wrote:
Ok..... Was the idea above so awful that you even did not try to give a comment of it and considering adding it to updates? :ftw:


Main Post :mrgreen:

http://www.tm-forum.com/viewtopic.php?f=127&t=22232

_________________
Galaad, le chevalier au coeur pur


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Sun Mar 21, 2010 3:03 am 
Offline
highway camper
highway camper

Joined: Sun Mar 21, 2010 2:52 am
Posts: 2
Owned TM-games: TMUF
I modified it so that the checkpoints will update in realtime, and so that users can hide the widget. Also added in the fix for CPs going to newline.

http://www.iron-pulse.com/TM_Plugins/bestcps.zip


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Wed May 26, 2010 9:55 pm 
Offline
highway camper
highway camper

Joined: Wed May 26, 2010 9:38 pm
Posts: 2
Owned TM-games: TMU
Hi
I have a problem with the updated version of that plugin .I get this error message in Xaseco --> [PHP Warning] array_keys() expects parameter 1 to be array, null given on line 180 in file plugin.bestcps.php.
[PHP Warning] in_array() expects parameter 2 to be array, null given on line 180 in file plugin.bestcps.php.
has someone an idea?

sorry for my english i'm german :D :D :D :D :D :D :D :thumbsup:


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon May 31, 2010 10:13 am 
Offline
cyclist
cyclist

Joined: Sat Jun 13, 2009 2:54 pm
Posts: 48
Owned TM-games: TMUF
easyshaker wrote:
Hi
I have a problem with the updated version of that plugin .I get this error message in Xaseco --> [PHP Warning] array_keys() expects parameter 1 to be array, null given on line 180 in file plugin.bestcps.php.
[PHP Warning] in_array() expects parameter 2 to be array, null given on line 180 in file plugin.bestcps.php.
has someone an idea?

sorry for my english i'm german :D :D :D :D :D :D :D :thumbsup:


Because you don't dowload my version XD

http://www.sendspace.com/file/j77ylv

_________________
Galaad, le chevalier au coeur pur


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon Oct 25, 2010 8:36 pm 
Offline
cyclist
cyclist

Joined: Thu Sep 30, 2010 7:33 pm
Posts: 40
Owned TM-games: TMNF
afisse wrote:
Hi all, here is the best Checkpoints widget

Image

how to configurate it like author pic?
give me cod pls


Last edited by Xymph on Mon Oct 25, 2010 9:27 pm, edited 1 time in total.
Fixed quoting


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon Oct 25, 2010 8:46 pm 
Offline
TM-Patrol
TM-Patrol
User avatar

Joined: Wed May 23, 2007 10:20 am
Posts: 1461
Location: Venray
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
try one of these in the .xml provided.
Code:
<orientation>1</orientation><!--0 : horizontal, 1 : vertical_V1, 2 : vertical_V2, 3 : vertical_V3 -->

_________________
Code:
tmnforever is nations and united makes it special. tmnforever has united. I need united!


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Thu Nov 04, 2010 12:26 am 
Offline
highway camper
highway camper

Joined: Tue Mar 04, 2008 12:49 am
Posts: 4
Owned TM-games: TMU
Hi ! How I can close the plugin when we are at the scores ?


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Thu Nov 04, 2010 1:28 am 
Offline
TM-Patrol
TM-Patrol
User avatar

Joined: Sat Dec 01, 2007 8:04 pm
Posts: 1845
Location: London, England
Owned TM-games: TMN, TMUF, TM Wii
In v1.1 add this after line 14 in plugin.bestcps.php
Code:
Aseco::registerEvent('onEndRace', 'clear_bestcps');


That will call this function (which is lines 252 - 255)
Code:
function clear_bestcps($aseco, $challenge){//efface le widget entre 2 challenges
   $xml = '<manialink id="123123456"></manialink>';
    $aseco->client->query("SendDisplayManialinkPage", $xml, 1, false);
}

_________________
My TMF Hub --- Server


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Fri Nov 05, 2010 12:05 am 
Offline
highway camper
highway camper

Joined: Tue Mar 04, 2008 12:49 am
Posts: 4
Owned TM-games: TMU
OMG It work !

Thanks you so much !


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Fri Nov 05, 2010 9:56 pm 
Offline
TM-Patrol
TM-Patrol
User avatar

Joined: Sat Dec 01, 2007 8:04 pm
Posts: 1845
Location: London, England
Owned TM-games: TMN, TMUF, TM Wii
no problem man :thumbsup:

_________________
My TMF Hub --- Server


Top
 Profile  
 
 Post subject: Re: [Xaseco] Best Checkpoints Widget
PostPosted: Mon Nov 08, 2010 1:01 am 
Offline
highway camper
highway camper

Joined: Sun Mar 21, 2010 2:52 am
Posts: 2
Owned TM-games: TMUF
easyshaker wrote:
Hi
I have a problem with the updated version of that plugin .I get this error message in Xaseco --> [PHP Warning] array_keys() expects parameter 1 to be array, null given on line 180 in file plugin.bestcps.php.
[PHP Warning] in_array() expects parameter 2 to be array, null given on line 180 in file plugin.bestcps.php.
has someone an idea?

sorry for my english i'm german :D :D :D :D :D :D :D :thumbsup:


fixed it, online zip updated - you can download it again from same link


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group