The online racing simulator
Searching in All forums
(535 results)
misiek08
S3 licensed
Hmm... Showing fuel status for others users - no, not this.

I wonna have fuel status for each player because I'm going to do few events with eco driving.

Second reason is saving PB's for races on server. Car with full fuel tank is a little bit slower so it's not good when in quali some drivers have 3% of fuel and some have 90% because it's needed for race.

It will help organizers to make more realistic events. No refuelling between qual and race.
misiek08
S3 licensed
This won't be flashed site. Only HTML and JS code. (PHP backend for sure)
Tracker a'la IGTC is my next project. It will be more extended than this. All the functionallity of GTAL tracker will be included + AJAX.
[InSim]Fuel
misiek08
S3 licensed
I really need fuel status in InSim. In rFactor and few other simulations it is built in. That would be really big innovation because we (programmers) can do more calculations by fuel. For example we can group the lap times by fuel and 10%-40% of tank and more.......

Maybe in MCI packet somewhere or NLP....
Linux panel
misiek08
S3 licensed
Hi!
If anyone of you have a linux control panel for LFS server I am asking for it.
I don't have much time for making new panel but I need it for my first international event wchich I'm gonna do at December if everything will go good....

I need support for multiple machines in this panel because maybe more than 8 lfs servers will be needed for this event and one machine will not get it with insim.
It will be good if the panel is written in PHP. If there is agent f.ex. in Perl it's ok. Source code PHP is needed because I have to add there InSim managing support which need 10 lines to add because InSim manage panel is done.
I have few machines with Xeon and Intel's E7400 on Debian 5.

I will not use this panel for selling LFS server or getting money in any way for it
misiek08
S3 licensed
But it is the future project. IGTC is for teams not for users only. I wonna do something like http://live.f1liga.pl/
misiek08
S3 licensed
I'll make 2 of this.
One for user tracking and one for teams tracking. First version is for user tracking

For teams there will be LTWT: Live Teams Web Tracker - it will looks like GTAL/IGTC tracker.

I wonna see which data you wonna see. All splits, laps, pitstops or what? It will be something like remote but bigger with more functionallity.
LWT: Live Web Tracker
misiek08
S3 licensed
Hi!
I started making live web tracker based on PRISM.
You can follow everything on github.

Now there is logging packets into DB. Next step is table to save live data. Here is my question. What would you like to see on the website. Write here all needed data.
misiek08
S3 licensed
Noob said in other topic: "I forgot most things". He's lying every time. I think it's an kiddy with ban on Search button and Google.
misiek08
S3 licensed
Quote from cargame.nl :What tomorrow exactly?

27-23 = 4.

I know that people like post sometimes kb and kB as the same thing. I think 01.11 will be date for the 0.3.1 release.
misiek08
S3 licensed
Stick it please.
misiek08
S3 licensed
1. It is near getUserNameByPLID and others like this.
misiek08
S3 licensed
Things to fix:
1. The are some undefined function like userGet.....
2. You have 2 classes for handle state. In prism_state.php in prism_statehandler.php (both are required?)
3. In subforum is topic Is_reo you have a discussion about IS_REO packet and I gave there a link for old post where GeForz made patch for IS_REO which is working.
4. Debug cvar is not considerated in the code. For example file: PHPInSimMod.php lines: 172-181

I'll post below new things if I'll found them.
Missing function
misiek08
S3 licensed
If u call getUserNameByPLID from plugin you will get:
Quote :PHP Fatal error: Call to undefined method test::userGetUserNameByUCID() i
n E:\prism\modules\prism_plugins.php on line 388

Fatal error: Call to undefined method test::userGetUserNameByUCID() in E:\prism\
modules\prism_plugins.php on line 388

misiek08
S3 licensed
I've edited it:

<?php 
class IS_REO extends struct // REOrder (when race restarts after qualifying)
{
    const 
PACK 'CCCCC32';
    const 
UNPACK 'CSize/CType/CReqI/CNumP/C32PLID';

    public 
$Size 36;        // 36
    
public $Type ISP_REO;// ISP_REO
    
public $ReqI;            // 0 unless this is a reply to an TINY_REO request
    
public $NumP;            // number of players in race

    
public $PLID = array();        // all PLIDs in new order

    
function unpack($rawPacket)
    {
        
$pkClass unpack($this::UNPACK$rawPacket);

        for (
$pos 1$pos <= 32; ++$pos)
        {
            
$pkClass['PLID'][$pos] = $pkClass["PLID{$pos}"];
            unset(
$pkClass["PLID{$pos}"]);
        }

        foreach (
$pkClass as $property => $value)
        {
            
$this->$property $value;
        }

        return 
$this;
    }
};
?>

And working plugin (get's the REO):

<?php 
php
class test extends Plugins
{
    const 
NAME 'Test';
    const 
AUTHOR 'Misiek';
    const 
VERSION PHPInSimMod::VERSION;
    const 
DESCRIPTION 'Testing PRISM.';

    public function 
__construct()
    {
        
$this->registerPacket('print_rr',ISP_REO);
    }

    public function 
print_rr($packet){
        foreach(
$packet->PLID as $pos => $plid){
            echo 
'Pos:'$pos' / PLID:'$plid' / Nick: ', (($plid != 0) ? $this->getClientByPLID($plid)->UName ''), PHP_EOL;
        }
    }
}
?>

Now the packing part and it will work!

EDIT:
I'll use for now edited pack and parsePackFormat functions from GeForz. I think, it should be added to main PRISM release.
Last edited by misiek08, .
misiek08
S3 licensed
When it will be done, developer?

Maybe it can help:

<?php 
class IS_REO extends ISP {
    public 
$Size 36;
    public 
$Type ISP_REO;
    public 
$ReqI// 0 unless this is a reply to an TINY_REO request
    
public $NumP;        // number of players in race

    
public $PLID = array();    // all PLIDs in new order
    
    
protected $up_format 'CSize/CType/CReqI/CNumP/CP0/CP1/CP2/CP3/CP4/CP5/CP6/CP7/CP8/CP9/CP10/CP11/CP12/CP13/CP14/CP15/CP16/CP17/CP18/CP19/CP20/CP21/CP22/CP23/CP24/CP25/CP26/CP27/CP28/CP29/CP30/CP31';
    protected 
$p_format 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC';

    public function 
unpack($data)
    {
        
$up unpack($this->up_format$data);
        
$this->Size $up['Size'];
        
$this->ReqI $up['ReqI'];
        
$this->NumP $up['NumP'];
        
$i 0;
        for(
$i 0$i 32; ++$i)
        {
            
$this->PLID[$i] = $up['P' $i];
        }
    }

    public function 
pack()
    {
        return 
pack($this->p_format$this->Size$this->Type$this->ReqI$this->NumP$this->PLID[0], $this->PLID[1], $this->PLID[2], $this->PLID[3], $this->PLID[4], $this->PLID[5], $this->PLID[6], $this->PLID[7], $this->PLID[8], $this->PLID[9], $this->PLID[10], $this->PLID[11], $this->PLID[12], $this->PLID[13], $this->PLID[14], $this->PLID[15], $this->PLID[16], $this->PLID[17], $this->PLID[18], $this->PLID[19], $this->PLID[20], $this->PLID[21], $this->PLID[22], $this->PLID[23], $this->PLID[24], $this->PLID[25], $this->PLID[26], $this->PLID[27], $this->PLID[28], $this->PLID[29], $this->PLID[30], $this->PLID[31]);
    }
}
?>

It's not finished but only first step to make it working in my PHPLFS edition.

EDIT:

Someone already did it:
http://www.lfsforum.net/showthread.php?p=1485152#post1485152

Maybe attach it to public release.
Last edited by misiek08, .
Test Day to Night conversion
misiek08
S3 licensed
First try conversing day to night:
http://www.youtube.com/watch?v=sPpsuX4H62E
I did it in 2 minutes and it's the primary conversion but it's not finished. Rate it please.

Only rear light and main light around car. Front light are made for example.
misiek08
S3 licensed
Could you make an plugin for that? For example register say command 'set grid', wchich restarts race and sets grid.
misiek08
S3 licensed
Ok, so let's take that array:

<?php 
$grid 
= array(3,4,9,21,5,12);
?>

That are PLID's sorted as grid. PLID 3 - 1st pos on start and so on.....
How to send it to server properly?

EDIT:
I didn't send REO before.
In PHPLFS I getted REO few times but always as CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.
Someone was talking me about receiving and sending as array but I don't know how.
Last edited by misiek08, .
misiek08
S3 licensed
No, sir. Positions on start, so they are not sorted out. I wonna get PLID's by username's but in PRISM IS_REO packet is wiritten as "a32" array not "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
misiek08
S3 licensed
__constructor or __contruct?

@down: I wasn't sure, because I thought you are going to implement __contructor in PRISM.
Last edited by misiek08, .
Is_reo
misiek08
S3 licensed
I have array like this:

<?php 
$grid 
= array('misiek08' => 2'Dygear' => 1'm1s1ek' => 3);
?>

Can you show me how with PRISM send this as grid on the race start?
misiek08
S3 licensed
Is it commited on GitHub now? And working of course...
misiek08
S3 licensed
And there is a next problem. For example if you have 32 on server with 32 slots so the LFS just shows "Too many clients". Maybe you wonna do it like CS slot reservation like forwarding when you have 31/32 players. So the packet with maxplayers will be needed.
misiek08
S3 licensed
I wonna for example have a 1-3 places shown all the time on screen.
3 buttons with first 3 players (winner and 2 others)
misiek08
S3 licensed
IS_RDR could be good but 1 thing: maybe an UCID / PLID argument. The LFS have to know who should be moved.
FGED GREDG RDFGDR GSFDG