The online racing simulator
Searching in All forums
(276 results)
Makao
S2 licensed
Nation: Poland, POL
Car: XFG
Nation drivers:
Miłosz Garbolewski / AsnL
Piotr Krzyżanowski / Pietter

Reserve:
Kamil Kukliński / kamo2000
Makao
S2 licensed
Makao
S2 licensed
teamName: Conquest Racing
class: GT500
car: FZR
number: 04
drivers:
- {Gargus, Mateusz Daszkiewicz, Poland}
- {GuRu_PL, Adrian Tomczyk, Poland}

teamName: Conquest Racing
class: GT300
car: FZR
number: 54
drivers:
- {Foqs, Łukasz Małecki, Poland}
- {Makao, Marcin Makałowski, Poland}
- {msk, Michał Miziołek, Poland}
Makao
S2 licensed
Nation: Poland, POL
Car: FZR
Nation drivers:
Tomek Nogieć / IMOL
Mateusz Daszkiewicz / Gargus

Reserve:
Adrian Tomczyk / GuRu_PL
Makao
S2 licensed
Makao
S2 licensed
• Session: Qual Race
• The correct lap: 10-11
• The cars (/teams) involved : #21, #54 and #75
• The lap/sector/time : S/F line
• And a short description from your point of view: #21 rammed GT300 cars.
Makao
S2 licensed
Quote from Makao :teamName: Conquest Racing
class: GT500
car: FZR
number: 04
drivers:
- {Gargus, Mateusz Daszkiewicz, Poland}
- {GuRu_PL, Adrian Tomczyk, Poland}

teamName: Conquest Racing
class: GT300
car: FZR
number: 54
drivers:
- {Foqs, Łukasz Małecki, Poland}
- {Makao, Marcin Makałowski, Poland}
- {msk, Michał Miziołek, Poland}

Update: Removed Piotr Goik from GT500 lineup.
Makao
S2 licensed
#54 Conquest Racing GT300
Makao
S2 licensed
teamName: Conquest Racing
class: GT500
car: FZR
number: 04
drivers:
- {Gargus, Mateusz Daszkiewicz, Poland}
- {GuRu_PL, Adrian Tomczyk, Poland}

teamName: Conquest Racing
class: GT300
car: FZR
number: 54
drivers:
- {Foqs, Łukasz Małecki, Poland}
- {Makao, Marcin Makałowski, Poland}
- {msk, Michał Miziołek, Poland}
Last edited by Makao, . Reason : Updated GT500 lineup.
Makao
S2 licensed
Poland skin by tfk

4096 version (temp download)
Makao
S2 licensed
Nation: Poland, POL
Car: FBM

Nation drivers:
Tomek Nogieć / IMOL
Adrian Tomczyk / GuRu_PL
Makao
S2 licensed
Quote from Kristi :What was the best time you guys could achieve? Did you reach 1.08?

http://www.spdoracing.com/eventdb/session/12326/results

Today this is more funny than then.
Makao
S2 licensed
teamName: Conquest Racing
class: GT300
car: FZR
number: 54
drivers:
- {AsnL, Miłosz Garbolewski, Poland}
- {Makao, Marcin Makałowski, Poland }
- {msk, Michał Miziołek, Poland}
Makao
S2 licensed
Poland FXO (by tfk)
Makao
S2 licensed
Nation: Poland, POL
Car: FXO

Nation drivers:
Tomek Nogieć / IMOL
Mateusz Daszkiewicz / Gargus
Makao
S2 licensed
Nation Manager: Marcin Makałowski / Makao
Nation Vice Manager: Przemek Wdowiarz / przemek21061995
Nation: Poland / POL
Nation Drivers:
- Miłosz Garbolewski / AsnL
- Adam Wiśniewski / Garfild12
- Mateusz Daszkiewicz / Gargus
- Adrian Tomczyk / GuRu_PL
- Tomek Nogieć / IMOL
- Kamil Kukliński / kamo2000
- Piotr Krzyżanowski / Pietter
- Radosław Zawielak / radebe13
- Radosław Grabowski / Radziomistrzu
- Piotr Goik / Ziomek21
Makao
S2 licensed
1st round clashes with CityLiga I think.
Makao
S2 licensed
I had to use G25 wheel buttons for looking around, it's easier for me to speak with ctrl than with shifter buttons, beacuse I always hit the stick.
Makao
S2 licensed
Quote from Dygear :Make sure the Flags for that host does not include ISF_LOCAL, or only in single player will you be able to use the InSim application, or just one your client when connected to servers.

I know that, I wasn't sending any flag. I'll try to get over it later.

I've made another update. This time I faced another issue. I am sending ISF_LOCAL now, because this plugin is going to work on local LFS instance. When I was using Shift + B combination I had few fatalities after calling undefined functions from ButtonManager and PRISM was restarting. I removed comments from ButtonManager code excluding removeButton(), because it was redeclared and now it works, but I can't turn this button on by pressing Shift + B one more time. I am not sure what I did.

And one more thing is there any outgauge simple example? "echo RPM" would be more than enough.
Makao
S2 licensed
Quote from Dygear :It's hard to document what is not a finished product. Things change.

Is something like this ok for documentation? I am trying to follow the PHP Manual Syntax as much as possible.

It's more than ok. IMO syntax is not that important for documentation as examples, that's why CodeIgniter User Guide is my favourite.

I've updated my plugin, now it can display results in game, but I have problem with buttons. I can't display buttons to all. I only managed to show them to local and by UCID, when I try 255, nothing appears. Did I miss something?
Makao
S2 licensed
Thanks for the feedback, I think I will have opportunity to write more with PRISM, this is fantastic the only thing missing are docs. It's not easy to learn how it work especially if someone started from current version and I didn't follow this project. Anyway this is going to change right now, because I'm impressed.
Best lap
Makao
S2 licensed
I've started playing with PRISM and I admit this is amazing.

I've made simple plugin which displays best laps of each class in the race. I will add some features like results after race. I haven't tested it with more than one car, but it seems to work.


<?php 
php

/**
 * PRSIM Best lap plugin
 * This plugin allows you to display best lap of each class in the multi-class race.
 * 
 * @author Makao
 * @version 0.1.2
 *
 */
class BestLap extends Plugins {
    const 
URL 'http://www.lfsforum.net/showthread.php?t=76342';
    const 
NAME 'Best Lap';
    const 
AUTHOR 'Makao';
    const 
VERSION '0.1.2';
    const 
DESCRIPTION 'Display best lap times for each class in multi-class races.';

    
/**
     * Best laps by class array
     * @access private
     * @var array
     */
    
private $Laps = array(
        
# Default best lap time (1 hour = 360000 ms), PLID: 0
        # class name => time_plid
        
'GTR' => '360000_0',
        
'GT2' => '360000_0',
        
'GT3' => '360000_0',
        
'GT9' => '360000_0',
        
'GTP' => '360000_0',
        
'NGT' => '360000_0',
        
'BGT' => '360000_0',
        
'LRF' => '360000_0',
        
'LX4' => '360000_0',
        
'TBO' => '360000_0',
        
'STD' => '360000_0'
    
);
    
/**
     * All (top) laps array
     * @access private
     * @var array
     */
    
private $TopLaps = array();
    
/**
     * Racing classes array
     * @access private
     * @var array
     */
    
private $Classes = array(
        
# class name => car name, intake restriction, additional mass
        
'GTR' => 'FZR,0,0;FXR,0,0;XRR,0,0',
        
'GT2' => 'FZR,20,0;FXR,23,0;XRR,24,0',
        
'GT3' => 'FZR,28,0;FXR,32,0;XRR,34,0',
        
'GT9' => 'FZR,21,0;FXR,24,0;XRR,25,0',
        
'GTP' => 'FZR,10,0;FXR,10,10;XRR,10,20',
        
'NGT' => 'UFR,0,0;XFR,0,0',
        
'BGT' => 'UFR,45,0;XFR,43,0',
        
'LRF' => 'LX6,0,0;RAC,0,0;FZ5,0,0',
        
'LX4' => 'LX4,0,0',
        
'TBO' => 'XRT,0,0;FXO,0,0;RB4,0,0',
        
'STD' => 'XFG,0,0;XRG,0,0'
    
);
    
/**
     * Drivers array
     * @access private
     * @var array
     */
    
private $Drivers = array();
    
/**
     * Show Results flag
     * @access private
     * @var boolean
     */
    
private $ShowResults FALSE;

    
/**
     * Constructor
     * @access public
     * @return void
     */
    
public function __construct() {
        
# Commands
        
$this->registerLocalCommand('reinit''reinitCmd''Display app main button.');
        
# Packets
        
$this->registerPacket('onPrismConnect'ISP_VER);
        
$this->registerPacket('compareLaps'ISP_LAP);
        
$this->registerPacket('onRestart'ISP_RST);
        
$this->registerPacket('newDriver'ISP_NPL);
    }
    
    
/**
     * Reinit Command
     * @access public
     * @param string $cmd
     * @param int $ucid 
     * @return void
     */
    
public function reinitCmd($cmd$ucid)
    {
        
$bestLapsBTN = new Button(Button::$TO_LOCAL'bestLapsShow''mainButtons');
        
$bestLapsBTN->L(85)->T(0)->W(15)->H(6);
        
$bestLapsBTN->BStyle ISB_DARK ISB_LEFT 1;
        
$bestLapsBTN->registerOnClick($this'DisplayResults');
        
$bestLapsBTN->Text('BEST LAPS')->send();
    }

    
/**
     * Display welcome message
     * @access public
     * @param IS_VER $VER 
     * @return void
     */
    
public function onPrismConnect(IS_VER $VER) {
        
# Hello World!
        
IS_MSL()->Msg('^3PRISM: Best lap plugin (^1' $this::VERSION '^3) connected.')->Send();
        
# Show 'Best Laps' button
        
$this->reinitCmd('reinit'0);
    }

    
/**
     * Compare current lap with best one
     * @access public
     * @param IS_LAP $LAP
     * @return void
     */
    
public function compareLaps(IS_LAP $LAP) {
        if (
$LAP->LapsDone != 1) { # Do not compare laps after 1st lap
            # Compare top laps
            
if (isset($this->TopLaps[$LAP->PLID])) {
                if (
$LAP->LTime $this->TopLaps[$LAP->PLID]) {
                    
$this->TopLaps[$LAP->PLID] = $LAP->LTime;
                }
            } else {
                
$this->TopLaps[$LAP->PLID] = $LAP->LTime;
            }
            
# Compare class laps
            
$class $this->getClass($LAP->PLID);
            if (
$class != '') {
                list(
$best$PLID) = explode('_'$this->Laps[$class]);
                if (
$LAP->LTime $best) {
                    
$this->Laps[$class] = $LAP->LTime '_' $LAP->PLID;
                    
$lapTime timeToString($LAP->LTime);
                    
$client $this->getClientByPLID($LAP->PLID);
                    
# Local message displaying fastest lap of the class
                    
IS_MSL()->Msg('^7' $class ': ^8Fastest lap: ' $lapTime ' by ' $client->PName)->Send();
                }
            }
            
# Update results if opened
            
if ($this->ShowResults == TRUE) {
                
$this->displayResults();
            }
        }
    }

    
/**
     * On restart delete all stored laps and hide results
     * @access public
     * @param IS_RST $RST 
     * @return void
     */
    
public function onRestart(IS_RST $RST) {
        
$this->hideResults(); # Hide results - no data to display
        
foreach ($this->Laps as $class => $time) {
            
$this->Laps[$class] = '360000_0';
        }
        
$this->TopLaps = array();
        
$this->Drivers = array();
        
# I am not sure about it, my imagination and it works :)
        
$this->sendPacket(IS_TINY()->ReqI(255)->SubT(TINY_NPL));
    }

    
/**
     * Add drivers to the array
     * @access public
     * @param IS_NPL $NPL 
     * @return void
     */
    
public function newDriver(IS_NPL $NPL) {
        
$this->Drivers[$NPL->PLID] = array(
            
'Name' => $NPL->PName,
            
'Car' => $NPL->CName,
            
'Class' => $this->assignClass($NPL->CName$NPL->H_TRes$NPL->H_Mass)
        );
    }

    
/**
     * Display final results
     * @access public
     * @return void
     */
    
public function displayResults() {
        
$this->hideResults(); # Hide results to avoid buttons overlaying
        
$this->ShowResults TRUE;
        
$display = array(
            
'left' => 5,
            
'top' => 39,
            
'width' => 60,
            
'height' => 8
        
);
        
# Title button
        
$titleBTN = new Button(Button::$TO_LOCAL'title''bestLapData');
        
$titleBTN->L($display['left'])->T(27)->W($display['width'])->H($display['height'] + 4);
        
$titleBTN->BStyle ISB_DARK ISB_LEFT 1;
        
$titleBTN->Text('Top laps')->send();
        
# Close button
        
$closeBTN = new Button(Button::$TO_LOCAL'close''bestLapData');
        
$closeBTN->L(61)->T(27)->W(4)->H(8);
        
$closeBTN->BStyle ISB_LEFT 5;
        
$closeBTN->registerOnClick($this'HideResults');
        
$closeBTN->Text('X')->send();
        
# Top 3 Laps
        
asort($this->TopLaps);
        for (
$i 1$i <= 3$i++) {
            
$time = ($i == 1) ? current($this->TopLaps) : next($this->TopLaps);
            if (
$time !== FALSE) {
                
$plid key($this->TopLaps);
                
$client $this->getClientbyPLID($plid);
                
$topBTN = new Button(Button::$TO_LOCAL'top''bestLapData');
                
$topBTN->L($display['left'])->T($display['top'])->W($display['width'])->H($display['height']);
                
$topBTN->BStyle ISB_DARK ISB_LEFT;
                
$topBTN->Text('^7'.$i.' ' $client->PName ' ^7' timeToString($time))->send();
                
$display['top'] += 8;
            }
        }
        
# Best Laps (according to classes)
        
foreach ($this->Laps as $class => $data) {
            list(
$time$plid) = explode('_'$data);
            if (
$time != 360000) {
                
$lapTime timeToString($time);
                
$client $this->getClientByPLID($plid);
                
# Single class result button
                
$topClassBTN = new Button(Button::$TO_LOCAL$class'bestLapData');
                
$topClassBTN->L($display['left'])->T($display['top'])->W($display['width'])->H($display['height']);
                
$topClassBTN->BStyle ISB_DARK ISB_LEFT;
                
$topClassBTN->Text('^7' $class ': ^8' $lapTime ' by ' $client->PName)->send();
                
$display['top'] += 8;
            }
        }
    }

    
/**
     * Hide final results
     * @access public
     * @return void
     */
    
public function hideResults() {
        
ButtonManager::removeButtonsByGroup(Button::$TO_LOCAL'bestLapData');
        
$this->ShowResults FALSE;
    }

    
/**
     * Assign a racing class for driver according to the selected car
     * @access private
     * @param string $cname
     * @param int $intake
     * @param int $mass
     * @return string 
     */
    
private function assignClass($cname$intake$mass) {
        foreach (
$this->Classes as $class => $data) {
            
$row explode(';'$data);
            foreach (
$row as $handicaps) {
                list(
$_car$_intake$_mass) = explode(','$handicaps);
                if (
$_car == $cname && $_intake == $intake && $_mass == $mass) {
                    return 
$class;
                }
            }
        }
    }

    
/**
     * Return vechicle class based on PLID
     * @access private
     * @param int $PLID
     * @return string 
     */
    
private function getClass($PLID) {
        foreach (
$this->Drivers as $id => $data) {
            if (
$id == $PLID) {
                return 
$data['Class'];
            }
        }
    }
}
?>

Last edited by Makao, . Reason : Code updated.
Makao
S2 licensed
I've added subtitles for Mumble speech.
Makao
S2 licensed
Quote from CrAZySkyPimp :Hi Edward

Haha, I am not that fat.
GT2 World Series 2011 Round 3 Conquests race start
Makao
S2 licensed
This is the simplest description how our race looked like: GT2 World Series 2011 Round 3 Conquests race start

Was very fun, thanks NDR!
FGED GREDG RDFGDR GSFDG