The online racing simulator
Ok,

Here the result in miliseconds is:

975765760

The right time em minutes is:

1:16.09

But 975765760ms != 1:16.09

Im lost..

Part of my code:


<?php 
 
function data($file)

    {

        
$areas = array("Blackwood" => "BL""South City" => "SO""Fern Bay" => "FE""Autocross" => "AU""Aston" => "AS""Kyoto Ring" => "KY""Westhill" => "WE");

        
$rp fopen($file"rb");

        if(
fread($rp6) == "LFSMPR")

        {

            
fread($rp14);

            
$r["laps"] = hexdec(bin2hex(fread($rp1)));

            
$r["skill"] = hexdec(bin2hex(fread($rp1)));

            
$r["wind"] = hexdec(bin2hex(fread($rp1)));

            
$r["started"] = hexdec(bin2hex(fread($rp1)));

            
$r["version"] = trim(fread($rp8));

            
$r["track"] = trim(fread($rp4));
                                
            
$r["stime"] = hexdec(bin2hex(fread($rp4)));

            
$area trim(fread($rp32));

            
$config hexdec(bin2hex(fread($rp1)));

            
$reversed hexdec(bin2hex(fread($rp1)));

            
$r["ilm"] = hexdec(bin2hex(fread($rp1)));

            
$finished hexdec(bin2hex(fread($rp1)));

            
$r["finished"] = $finished;
            
            
fread($rp4);

            
$fastestlap=9999999;

             for(
$i 0;$i $finished$i++)
                       
//$i > $finished
            
{
                
$o[$i]["driver"] = trim(fread($rp24));//player name

                
$o[$i]["plate"] = trim(fread($rp8));// plate

                
$o[$i]["auto"] = trim(fread($rp4));//car name

                
fread($rp24);

                
$o[$i]["laps_c"] = hexdec(bin2hex(fread($rp2)))/256;//laps completed

                
fread($rp2);

                
$o[$i]["maha"] = fread($rp1);//confirm flags

                
$o[$i]["pits"] = hexdec(bin2hex (fread($rp1). $pits[$i]));//n pits

                
fread($rp1);

                
fread($rp1);

                
$o[$i]["ttime"] = hexdec(bin2hex(fread($rp4)));//total time

                
$o[$i]["btime"] = hexdec(bin2hex(fread($rp4)));//best time

                
fread($rp4);

            }

        }
    

        
$r["res"] = $o;

        return 
$r;

    }
?>

Before patch X:


<?php 
         $o
[$i]["ttime"] = msht(fread($rp4));//total time

                
$o[$i]["btime"] = msht(fread($rp4));//best time
?>

Help!!!

JS
You read the int in wrong byte order.

975765760 = 3A 29 01 00
00 01 29 3A = 76090
Bingo..!

Thanks!!

JS
Hi
From liveforspeed.es we're right now using the scripts provided to retrieve hotlap info from lfsworld. Right now it's possible to get (hlvc) lap times, split times, driving help used, etc... but no handicap info at all.
Are you planinng to offer that info as well in the near future? That would be very helpful for us, as we're planning to host league events and use the handicap system.
So we need to make sure the drivers are using the correct handicap in their hlvc laps.
Regards.
Hey Victor,

could you add the Flag "Force Cockpit View" when querying data with "?action=hosts", plz!

I'm thinking about something like:
rules bits :
CAN_VOTE 1
CAN_SELECT 2
QUALIFY 4
PRIVATE 8
MODIFIED 16
MIDRACEJOIN 32
MUSTPIT 64
FCV 128


Big Thanks!
it's already there as 256
Wow, that was fast.

And what is 128 for?

Could you update the 1st posting please? Thx.
i don't know what 128 is for tbh - have to ask scawen. It's not used on lfsworld.
At a guess I'd assume "can reset".
Hi, this would be VERY useful for us and I'm sure this will be useful also for other LFS leagues.

http://www.lfsforum.net/showthread.php?t=28019

It is indispensable to have the handicaps information in the data returned by the LFSWorld script (online times and HL times) in order to organize an LFS league with handicaps.

Thanks in advance.
Victor, is there any chance we could get some kind of unique ID for each team, when requesting the team database?

At the moment, if you are storing a database of teams, and one changes their name, it will appear to be a new team.
i could add an id, but in a next version of the pubstats. It would break compatibility.
Quote from narcis :Hi, this would be VERY useful for us and I'm sure this will be useful also for other LFS leagues.

http://www.lfsforum.net/showthread.php?t=28019

It is indispensable to have the handicaps information in the data returned by the LFSWorld script (online times and HL times) in order to organize an LFS league with handicaps.

Thanks in advance.

Sorry, but I really don't know what you mean.
There are no handicaps for online times. And the handicaps i show for hotlaps are calculated according to the WR times. So if you just get the WR times, then you can calculate the handicaps yourself.
Quote from Victor :Sorry, but I really don't know what you mean.
There are no handicaps for online times. And the handicaps i show for hotlaps are calculated according to the WR times. So if you just get the WR times, then you can calculate the handicaps yourself.

I think he meant these handicaps. I believe this balancing thingy is temporary anyway, dunno how much support it should have.
Quote from Victor :Sorry, but I really don't know what you mean.

I think, that narcis (and me too :shy would like to retrieve handicap mass and restriction. This information is already in the hotlap SPR file header (bytes 28 and 29), but it would be handy this to apear for example in get_stat2.php?action=hl. Usually it doesn't make sense to apply voluntary restrictions in hotlaps. For our Czech league, we use hotlaps from lfsworld to divide racers into several divisions and we would like to be able to easily check required restrictions for some car. I hope it makes sense now .
Quote from Kada_CZ :I think, that narcis (and me too :shy would like to retrieve handicap mass and restriction. This information is already in the hotlap SPR file header (bytes 28 and 29), but it would be handy this to apear for example in get_stat2.php?action=hl. Usually it doesn't make sense to apply voluntary restrictions in hotlaps. For our Czech league, we use hotlaps from lfsworld to divide racers into several divisions and we would like to be able to easily check required restrictions for some car. I hope it makes sense now .

Exactly, this is the idea I am trying to explain, thanks .

It does not make sense to have mass restriction in online mode, and haven't this restriction in HLVC mode in a league, because the times needed to split racers into several pools wouldn't have mass restrictions, and in the race (online) these same racers would race WITH mass restrictions.

In a league with only one available car, this is not a problem, but using a car group that have GLOBAL handicaps applied (TBO for example), this IS a problem, because the time differences between the group cars will be different in HLVC (pre-race) and online (race).

I think I have explained the problem better .

Thanks .
How about a new function that allows us to retrieve the nationality, real name, date of birth etc. of any racer who has that information in their profile? As this would be a new function, I guess it would not break compatibility?
-
(imthebestracerthereis) DELETED by imthebestracerthereis : I found the thread, i dont understand, resorting to something easier :|
I'm writing an application to get pb's of a couple of drivers, for testing the whole thing i thought i used more then 1 identkey so i asked someone for his identkey but when i fire a query every 2,5 second it returns

can't reload this page that quickly after another


is there also an ip check? Or is there some mistake in my application?
Quote from wimpie :I'm writing an application to get pb's of a couple of drivers, for testing the whole thing i thought i used more then 1 identkey so i asked someone for his identkey but when i fire a query every 2,5 second it returns

can't reload this page that quickly after another


is there also an ip check? Or is there some mistake in my application?

I would think that is against the TOS.
Quote from Victor :

-----------
?action=pst
-----------
(online statistics of one racer)

requires: &racer=<racer>
optional: -
returns: distance in metres
..
..
current / last hostname (or blank line if not online or on hidden host)
last_activity_time(*) (Unix timestamp (UTC))
current / last track(*)
current / last car(*)


Just a quick question to you, Victor... would it be possible for you to revert the last activity information to before the "Phlos is my god" incident?

http://forum.lfs-noobs.org/showols.php

I hate to have this manifest of a script kiddies work on our site..
Quote from nikka :Just a quick question to you, Victor... would it be possible for you to revert the last activity information to before the "Phlos is my god" incident?

http://forum.lfs-noobs.org/showols.php

I hate to have this manifest of a script kiddies work on our site..

For us it worked like this:
Driver had to go online, entered a server, then the info was back to normal.
Quote from nikka :Just a quick question to you, Victor... would it be possible for you to revert the last activity information to before the "Phlos is my god" incident?

http://forum.lfs-noobs.org/showols.php

I hate to have this manifest of a script kiddies work on our site..

currently running a cleanup script to write correct values back again. So if you refresh your values tonight, they should be ok again.
Quote from BBO@BSR :For us it worked like this:
Driver had to go online, entered a server, then the info was back to normal.

Only problem is we have a couple of members on.. uhm.. vacation.

Quote from Victor :currently running a cleanup script to write correct values back again. So if you refresh your values tonight, they should be ok again.

Yup, seems better now. Last activity time is reverted, but last hostname and last car seems to be blank, last track is 000.
But still way better than it used to be, thanks!
-
(niall09) DELETED by niall09

FGED GREDG RDFGDR GSFDG