The online racing simulator
Searching in All forums
(116 results)
jscorrea
S2 licensed
jscorrea
S2 licensed
Daniele,

XOOPS is a portal system like PHPNuke.

The original code, developed by prits, is ported to use with Xoops.

The final code comming..
jscorrea
S2 licensed
Nice!!
jscorrea
S2 licensed
Sim soyo, com as screns de cada pista, depois te passo.

Soyo:

I can help you?

Js:

Yes with the screens of the tracks...


JS
MPR - Nickname?
jscorrea
S2 licensed
MPR file header format for LFS S2 (from 0.5P):
[FONT=FIXED SYS]NF result 80 RESULT INFO : (see below)

RESULT INFO : size 80 bytes per finished player

24 char 0 player name : text, ends 0, no colours
8 char 24 number plate : text, NOTE : NO ZERO AT END
4 char 32 short car name : text, ends 0
24 byte 36 0 : -
1 word 60 laps done : total laps completed
1 word 62 player flags : driver settings (see NOTES)
1 byte 64 confirm flags : penalties (see NOTES)
1 byte 65 number of stops : pit stops count
1 byte 66 0 : -
1 byte 67 0 : -
1 time 68 overall time : msht time
1 time 72 best lap time : msht time (first check point)
1 int 76 0 : -[/FONT]

Look this code above, we have "player name" - Name in LFS (game) and "plate" - text in the plates of the car.

Where we have (nickname - the correct is USERNAME) to search the profile in the LFSworld for example?

Regards,
JS
Last edited by jscorrea, .
jscorrea
S2 licensed
PROGRESS:

- list for all drivers (comming)

- list for all teams (comming)

- flags and teams in the results table...(done)

- picture for each Touney ( Tourneys page ) (done)

More:

- pits (done)
- laps of each racer (done)
- dif time => +(x)laps (done)
- points for Team (comming)

JS
jscorrea
S2 licensed
finaly, the right code....


<?php 
for($i 0$i $finished$i++)
        {
            
$o[$i]["soitja"] = trim(fread($rp24));
            
$o[$i]["plate"] = trim(fread($rp8));
            
$o[$i]["auto"] = trim(fread($rp4));
            
fread($rp24);
            
$o[$i]["laps_c"] = hexdec(bin2hex(fread($rp2)))/256;
            
fread($rp2);
            
fread($rp1);
            
$o[$i]["pits"] = hexdec(bin2hex (fread($rp1). $pits[$i]));
            
fread($rp1);
            
fread($rp1);
            
//$o[$i]["maha"] = hexdec(bin2hex(fread($rp, 1)));
            
$o[$i]["lopp"] = msht2int(fread($rp4));
            
$o[$i]["parim"] = msht2int(fread($rp4));

               
fread($rp4);
        } 
?>

Last edited by jscorrea, .
jscorrea
S2 licensed
Quote from filur :Confusing, you're reading 24 bytes of player name, 8 bytes of number plate, 32 bytes of short car string which is only 4 bytes, then you do nothing about the 24 NUL bytes, the commented line attempts to read a 2-byte word as 1 byte, attempt to skip next 2-byte word by reading 1 byte, etc.

Or am i too tired?

yes is very strange, but this works!!

This code is from priits (tourney system), the code of other MPR parser is almost identical.

The only thing what i need is "laps done for each racer"..im not understand...

JS
Comparison..
jscorrea
S2 licensed
A piece of PHP code:


<?php 
for($i 0$i $finished$i++)
        {
            
$o[$i]["player_name"] = trim(fread($rp24));
            
$o[$i]["plate"] = trim(fread($rp8));
            
$o[$i]["car"] = trim(fread($rp32));
            
//$o[$i]["laps_c"] = hexdec(bin2hex(fread($rp, 1)));
            
fread($rp1);
            
$o[$i]["pits"] = hexdec(bin2hex (fread($rp1). $pits[$i]));
            
fread($rp1);
            
$o[$i]["?????"] = hexdec(bin2hex(fread($rp1)));
            
$o[$i]["overall_time"] = msht2int(fread($rp4));
            
$o[$i]["best_lap"] = msht2int(fread($rp4));

               
fread($rp4);
        }
?>

A piece of MPR Header code:

[FONT=FIXED SYS]RESULT INFO : size 80 bytes per finished player

24 char 0 player name : text, ends 0, no colours
8 char 24 number plate : text, NOTE : NO ZERO AT END
4 char 32 short car name : text, ends 0
24 byte 36 0 : -
1 word 60 laps done : total laps completed
1 word 62 player flags : driver settings (see NOTES)
1 byte 64 confirm flags : penalties (see NOTES)
1 byte 65 number of stops : pit stops count
1 byte 66 0 : -
1 byte 67 0 : -
1 time 68 overall time : msht time
1 time 72 best lap time : msht time (first check point)
1 int 76 0 : -[/FONT]

this is a line:

1 word 60 laps done : total laps completed


JS
jscorrea
S2 licensed
Quote from colcob :Is this your code, or have you got it from somewhere. Because just glancing at it, it looks like you just need to uncomment the line \\$o[$i]["laps_c"] = hexdec(bin2hex(fread($rp, 1)));

This line was created by me Col, if uncommnet give error.

JS
jscorrea
S2 licensed
Sorry,

I was not very clearly.

How to include a line in my code that it allows to show the numbers to me of laps completed of each players?

JS
MPR - How to get laps done for each racer?
jscorrea
S2 licensed
Hello all,

Look this code:


<?php 
if(fread($rp6) == "LFSMPR")
    {
        
fread($rp14);
        
$r["ringe"] = hexdec(bin2hex(fread($rp1)));
        
$r["skill"] = hexdec(bin2hex(fread($rp1)));
        
$r["tuul"] = hexdec(bin2hex(fread($rp1)));
        
$r["wind"] = hexdec(bin2hex(fread($rp1)));
        
$r["version"] = trim(fread($rp8));

        
fread($rp8);
        
$area trim(fread($rp32));
        
$config hexdec(bin2hex(fread($rp1)));
        
$reversed hexdec(bin2hex(fread($rp1)));
        
        
$r["ilm"] = hexdec(bin2hex(fread($rp1)));
        
$r["rada"] = $areas[$area].$config.($reversed "r" "");

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

        
fread($rp4);
     
        for(
$i 0$i $finished$i++)
        {
            
$o[$i]["soitja"] = trim(fread($rp24));
            
$o[$i]["plate"] = trim(fread($rp8));
            
$o[$i]["auto"] = trim(fread($rp32));
            
//$o[$i]["laps_c"] = hexdec(bin2hex(fread($rp, 1)));
            
fread($rp1);
            
$o[$i]["pits"] = hexdec(bin2hex (fread($rp1). $pits[$i]));
            
fread($rp1);
            
$o[$i]["maha"] = hexdec(bin2hex(fread($rp1)));
            
$o[$i]["lopp"] = msht2int(fread($rp4));
            
$o[$i]["parim"] = msht2int(fread($rp4));

               
fread($rp4);
        }
    }
?>

In which place of this code do I insert to obtain laps completed for each racer?

Sorry for my english...

Regards
Last edited by jscorrea, .
jscorrea
S2 licensed
Last edited by jscorrea, .
jscorrea
S2 licensed
Hello priits, features comming:

- list for all drivers

- list for all teams

- flags and teams in the results table...

- picture for each Touney ( Tourneys page )

For use with xoops:

www.xoops.org

Xoops is a CMS.

JS
jscorrea
S2 licensed
brilliant
jscorrea
S2 licensed
A conversion for use with xoops is comming(80%).

JS
jscorrea
S2 licensed

Congrats!!!
Nice Work!!!
jscorrea
S2 licensed
Final 2006 - S2 Beta
Final 2007 - S2 Full
Final 2010 - S3 (edit tracks/cars...maybe?)
jscorrea
S2 licensed
Nice!!

Irei testar à noite.

Abraços,
JS
jscorrea
S2 licensed
Quote from Blues :...
LFS is still the best racing simulator out here...and LFS is not finished...

Will it be what a day is the Live for Speed it will be finished?

Will not it be something too great for 3 simple men?

When it is finished will not be very old regarding the commercial simulators?

I would like very that everything stayed well.
jscorrea
S2 licensed
Happy Birthday Scawen

Greetings from Brazil


jscorrea
S2 licensed
Thanks!!!
jscorrea
S2 licensed
How to join two full scenes?

Two different cars for i.e.

The scenes is from DSRC (Ian H).

JS
jscorrea
S2 licensed
34
jscorrea
S2 licensed
Delerue is much problematic, dont reply this man!!!illepall

Regards,

JS
FGED GREDG RDFGDR GSFDG