The online racing simulator
Quote from Gai-Luron :
not possible, the info is not available in insim

If there are OnFalseStart events, lfs must know somehow in some way that the red lights are still on or that the lights have not turned green yet?

How could OnFalseStart events exists otherwise?

Olivier
Quote from iOL(Qc) :If there are OnFalseStart events, lfs must know somehow in some way that the red lights are still on or that the lights have not turned green yet?

How could OnFalseStart events exists otherwise?

Olivier

The OnFalseStart events are spawned when Lapper receives a Penalty packet via InSim, so its LFS itself that determines a false start and Lapper is only responding to that event.
Quote from Krayy :The OnFalseStart events are spawned when Lapper receives a Penalty packet via InSim, so its LFS itself that determines a false start and Lapper is only responding to that event.

So lfs knows when the light is'nt green yet in some way.

Its a data, why cant it be processed by the lapper like any other data?

Olivier
its a nice idea
but not included in the insim yet.( i think)

so i hope the devs gonna update the insim in the future.
Quote from iOL(Qc) :So lfs knows when the light is'nt green yet in some way.

Its a data, why cant it be processed by the lapper like any other data?

Olivier

InSim is basically an outgoing data stream that the LFS devs wrote to encourage community involvement. It was not designed as an API or an interface to modify in-game variables or affect LFS directly. The development of the InSim functions was largely driven by community requests through the LFS Improvements forum (http://www.lfsforum.net/forumdisplay.php?f=8), but as it takes time to implement the functionality, it's been at the developers discretion as to whether a particular feature gets in.

With regards to false starts, this was addressed in the IS_PEN packet which covers the following penalties:

PENR_UNKNOWN, // 0 - unknown or cleared penalty
PENR_ADMIN, // 1 - penalty given by admin
PENR_WRONG_WAY, // 2 - wrong way driving
PENR_FALSE_START, // 3 - starting before green light
PENR_SPEEDING, // 4 - speeding in pit lane
PENR_STOP_SHORT, // 5 - stop-go pit stop too short
PENR_STOP_LATE, // 6 - compulsory stop is too late

If you're writing your own InSim app, or modifying the Lapper code (not the .lpr files, but the .cs source code), then you could probably send an TINY_MCI request to get user data sent back to your app and process it to find speed/heading etc, but why bother? The user was moving so he got penalised, and knowing if he was going 30km/h doesn't matter at all.

I suppose the biggest question to answer is "What exectly do you want to do if someone jumps the start?". Answer that and we'll tell you if it's possible.

Also, try using the tool InSim Sniffer that you run alongside the LFS Server to see what InSim packets are being sent during a race to determine what your InSim app can react to.
That is a very clear and complete answer Krayy thanks a lot.

Is there a way to use LFS stat command in a .lpr?
(stats from LFSworld)

I tryed:

<?php 
globalMsg
langEngine"^7User: {0} pb: {1}",$user,cmdLFS"/w pb " $user)));
?>

($user is a valid lfs username)

But the server is doiing the command so the car/track is unknown.
How?

EDIT: Also, i dont know how to use getPlayerInfo().

<?php 
$info 
getPlayerInfo$user );

                              
globalMsg""$info);    #returns the string "Array"

                              
globalMsg""$info["PSCountry"]);    #returns nothing
                                          
                              
globalMsg""$info[0]); #returns nothing
?>

Olivier
Quote from iOL(Qc) :That is a very clear and complete answer Krayy thanks a lot.

Is there a way to use LFS stat command in a .lpr?
(stats from LFSworld)

I tryed:

<?php 
globalMsg
langEngine"^7User: {0} pb: {1}",$user,cmdLFS"/w pb " $user)));
?>

($user is a valid lfs username)

But the server is doiing the command so the car/track is unknown.
How?

EDIT: Also, i dont know how to use getPlayerInfo().

<?php 
$info 
getPlayerInfo$user );
 
                              
globalMsg""$info);    #returns the string "Array"
 
                              
globalMsg""$info["PSCountry"]);    #returns nothing
 
                              
globalMsg""$info[0]); #returns nothing
?>

Olivier

Hi,
Its already in lapper
Try !who and you see all PB's on LFSWorld from all connected players.

And with " /ws trackname carname pb username " you can use this in lapper.
Tim NL said:
Quote from Tim NL :
And with " /ws trackname carname pb username " you can use this in lapper.

Sinanju said:
Quote :
Quote:
Originally Posted by Tim NL
EDIT: USAGE: /w CMD [name] | CMD = pb,hl,wr,l,tl,ds,f,1,2,3,fin
You can try cmdLFS("/ws AS6 XRT pb " . $Username );
It work's when i type it

Sorry, but doesn't work.


I cant get this to work in lapper i tryed:

<?php 
cmdLFS
("/ws "$track" " $car " pb "$user);
   or
cmdLFS("/ws XFG pb iol(qc)");
   or
globalMsg(cmdLFS("/ws "$track" " $car " pb "$user));
?>

I think that for this to work, the user have to "say it" in chat.
There is no function like playersay($username, "have a good day") so we could make the player say /ws XFG pb iol(qc) ?

I would really enjoy to be able to get stats with /ws in .lpr

Is it possible or we can only use the playervar?

Olivier
All !ps vars gives me 0.


Like those:

PSDistance, // online statistics of one racer - distance in metres
PSFuel, // online statistics of one racer - fuel burnt in cl
PSLaps, // online statistics of one racer - laps
PSHostsJoined, // online statistics of one racer - hosts joined
PSWins, // online statistics of one racer - Wins
PSSecond, // online statistics of one racer - Second
PSThird, // online statistics of one racer - third
PSFinished, // online statistics of one racer - finished
PSQuals, // online statistics of one racer - quals
PSPole, // online statistics of one racer - pole
PSDrags, // online statistics of one racer - drags
PSDragWins, // online statistics of one racer - drag wins

Any idea why?

Olivier
Hello,

Did you set your pubstatIdk in config file?

Gai-Luron
Gai-Luron said:
Quote from Gai-Luron :Hello,

Did you set your pubstatIdk in config file?


Thanks that was it!

Where can i see an updated list of lappervars?

I know there is more then:

RotateIn -> Races remaining before Rotation
HostName -> Current host Name
ShortTrackName -> Track Name in Short format : SO6
LongTrackName -> Track Name in long format : South City Chicane
ShortTime -> Server Time in short format
LongTime -> Server Time in long format
ShortDate -> Date in short format
LongDate -> Date in long format
CurrRotateCar -> Current rotated Car
CurrRotateTrack -> Current rotated Track
CurrLongRotateTrack -> Current rotated Track
NextRotateCar -> Next rotated Car
NextRotateTrack -> Next rotated Track
NextLongRotateTrack -> Next rotated Track
RequiredFlags -> Flag(s) required on this server

I was looking for something like:

<?php 
getLapperVar
"nbConnectedPlayers" )
?>

EDIT: The answer to my question is you can find all new lapperVars in changes.txt .
Quote from iOL(Qc) :I was looking for something like:

<?php 
getLapperVar
"nbConnectedPlayers" )
?>



<?php 
GetLapperVar
("numConns");
?>

Quote from iOL(Qc) :...
EDIT: The answer to my question is you can find all new lapperVars in changes.txt .

Also, download the source and look in the src\LFSClient\GLSPlayerVars.cs file at the top.
Language selection
Hi,
A while ago, Sinanju made a post in the config help. It was about making your own buttons to choose your language of LFSLapper.

Quote from sinanju :I'd like to be able to offer a language choice using buttons as part of my HELP instructions - see attached mock-up.

Apart from using the !myconfig command, which also gives other choices that I don't want to include, is there anyway of doing this?

I´m now busy with making LFSLapper fully graphical and implementing it to my website. It would be great if I can also make an button in my own menu for choosing your language.

Is it possible?

Thanks!

Tim
i belive that there is a player var that can be set... idk what it is though
Quote from emit-nl :Hi,
A while ago, Sinanju made a post in the config help. It was about making your own buttons to choose your language of LFSLapper.



I´m now busy with making LFSLapper fully graphical and implementing it to my website. It would be great if I can also make an button in my own menu for choosing your language.

Is it possible?

Thanks!

Tim

Just use setplayervar or setcurrentplayver like this:

setcurrentplayervar("idlang", "fr"); # change to french
setcurrentplayervar("idlang", "en"); # change to english
Quote from Krayy :Just use setplayervar or setcurrentplayver like this:

setcurrentplayervar("idlang", "fr"); # change to french
setcurrentplayervar("idlang", "en"); # change to english

knew it was something like that
Quote from Krayy :Just use setplayervar or setcurrentplayver like this:

setcurrentplayervar("idlang", "fr"); # change to french
setcurrentplayervar("idlang", "en"); # change to english

Thanks mate!
Now I can go on with my script

Many thanks,
Bye!

Tim
Hi,
I have another question.
My registration script to register an account for my website in LFSLapper is almost finished, but now I've got a problem.

If the username is MyName, the function: GetCurrentPlayerVar("UserName"); gives me myname instead of MyName.
Is it possible to keep the capital letters? This would be really great.

Thanks in advance,
Tim

Edit: Ahh I can't get it to work, the Language menu. Could you guys help me with this please?

What I'm trying is to make the current language blue (^6) and the other languages white (^7). This script is inside a Sub.

<?php 
    $btncolor_en 
"^7";
    
$btncolor_fr "^7";
    
$btncolor_nl "^7";
    
$btncolor_no "^7";

    
$user_lang GetCurrentPlayerVar("IdLang");
    IF(
$user_lang == "en")
    
THEN
    $btncolor_en 
"^6";
    ELSEIF(
$user_lang == "fr")
    
$btncolor_fr "^6";
    ELSEIF(
$user_lang == "nl")
    
$btncolor_nl "^6";
    ELSEIF(
$user_lang == "no")
    
$btncolor_no "^6";
    ENDIF

openPrivButton"option_Lang_en",84,75,17,4,4,-1,16,$btncolor_en."English",SetCurrentPlayerVar("IdLang","en"));
?>

Quote from emit-nl :Hi,
I have another question.
My registration script to register an account for my website in LFSLapper is almost finished, but now I've got a problem.

If the username is MyName, the function: GetCurrentPlayerVar("UserName"); gives me myname instead of MyName.
Is it possible to keep the capital letters? This would be really great.

Thanks in advance,
Tim

Edit: Ahh I can't get it to work, the Language menu. Could you guys help me with this please?

What I'm trying is to make the current language blue (^6) and the other languages white (^7). This script is inside a Sub.

<?php 
    $btncolor_en 
"^7";
    
$btncolor_fr "^7";
    
$btncolor_nl "^7";
    
$btncolor_no "^7";

    
$user_lang GetCurrentPlayerVar("IdLang");
    IF(
$user_lang == "en")
    
THEN
    $btncolor_en 
"^6";
    ELSEIF(
$user_lang == "fr")
    
$btncolor_fr "^6";
    ELSEIF(
$user_lang == "nl")
    
$btncolor_nl "^6";
    ELSEIF(
$user_lang == "no")
    
$btncolor_no "^6";
    ENDIF

openPrivButton"option_Lang_en",84,75,17,4,4,-1,16,$btncolor_en."English",SetCurrentPlayerVar("IdLang","en"));
?>



<?php 
openPrivButton
("option_Lang_en",84,75,17,4,4,-1,16,$btncolor_en."English",SetLang("en"));
openPrivButton("option_Lang_fr",84,75,17,4,4,-1,16,$btncolor_fr."French",SetLang("fr"));
 

Sub SetLang($lang)
SetCurrentPlayerVar("IdLang",$lang)
ENDSub
?>


Try This :]
Thanks! It wasn't working immediately, but after some recoding I managed to do this:


<?php 
Sub DoMenu_Options
($KeyFlags,$userName)

    
openPrivButton"option_lang_bg",83,69,34,16,5,-1,16,"");
    
openPrivButton"option_lang_title",84,69,32,5,5,-1,0,"^7Language");
    
    
$user_lang GetCurrentPlayerVar("IdLang");
    
privMsg("^4Your current language: ".$user_lang);

        IF(
$user_lang == "en")
        
THEN
        privMsg
("Language=English");
        
$btncolor_en "^6";
    ENDIF        
        IF(
$user_lang == "fr")
        
THEN
        privMsg
("Language=French");
        
$btncolor_fr "^6";
    ENDIF        
        IF(
$user_lang == "nl")
        
THEN
        privMsg
("Language=Dutch");
        
$btncolor_nl "^6";
    ENDIF        
        IF(
$user_lang == "no")
        
THEN
        privMsg
("Language=Norvegian");
        
$btncolor_no "^6";
    ENDIF        

    
openPrivButton("option_Lang_en",84,75,16,4,4,-1,32,"^7".$btncolor_en."English",SetLang_en);
    
openPrivButton("option_Lang_fr",100,75,16,4,4,-1,32,"^7".$btncolor_fr."French",SetLang_fr);
    
openPrivButton("option_Lang_nl",84,80,16,4,4,-1,32,"^7".$btncolor_nl."Dutch",SetLang_nl);
    
openPrivButton("option_Lang_no",100,80,16,4,4,-1,32,"^7".$btncolor_no."Norvegian",SetLang_no);
EndSub

Sub SetLang_en
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","en");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_fr
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","fr");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_nl
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","nl");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_no
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","no");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
?>


The reason I made a separate Sub for all languages, is because it didn't worked to have an SetLang("...") in a privButton. I don't know why..

But it works now!
Thanks for the help!

Tim
Quote from emit-nl :Thanks! It wasn't working immediately, but after some recoding I managed to do this:


<?php 
Sub DoMenu_Options
($KeyFlags,$userName)

    
openPrivButton"option_lang_bg",83,69,34,16,5,-1,16,"");
    
openPrivButton"option_lang_title",84,69,32,5,5,-1,0,"^7Language");
    
    
$user_lang GetCurrentPlayerVar("IdLang");
    
privMsg("^4Your current language: ".$user_lang);

        IF(
$user_lang == "en")
        
THEN
        privMsg
("Language=English");
        
$btncolor_en "^6";
    ENDIF        
        IF(
$user_lang == "fr")
        
THEN
        privMsg
("Language=French");
        
$btncolor_fr "^6";
    ENDIF        
        IF(
$user_lang == "nl")
        
THEN
        privMsg
("Language=Dutch");
        
$btncolor_nl "^6";
    ENDIF        
        IF(
$user_lang == "no")
        
THEN
        privMsg
("Language=Norvegian");
        
$btncolor_no "^6";
    ENDIF        

    
openPrivButton("option_Lang_en",84,75,16,4,4,-1,32,"^7".$btncolor_en."English",SetLang_en);
    
openPrivButton("option_Lang_fr",100,75,16,4,4,-1,32,"^7".$btncolor_fr."French",SetLang_fr);
    
openPrivButton("option_Lang_nl",84,80,16,4,4,-1,32,"^7".$btncolor_nl."Dutch",SetLang_nl);
    
openPrivButton("option_Lang_no",100,80,16,4,4,-1,32,"^7".$btncolor_no."Norvegian",SetLang_no);
EndSub

Sub SetLang_en
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","en");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_fr
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","fr");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_nl
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","nl");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_no
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","no");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
?>


The reason I made a separate Sub for all languages, is because it didn't worked to have an SetLang("...") in a privButton. I don't know why..

But it works now!
Thanks for the help!

Tim

ahh... was thinking of php >.<
im getting this error :/ Lang : en (id notfound) any ideas? (we purchased server recently from 500 servers)
Quote from Mustangman759 :im getting this error :/ Lang : en (id notfound) any ideas? (we purchased server recently from 500 servers)

can you let me take care of my own problems
Quote from Mustangman759 :im getting this error :/ Lang : en (id notfound) any ideas? (we purchased server recently from 500 servers)

The message indicates that the Language entry for "id" does not exists. So, if your script has:

<?php 
    globalRcm
langEngine"%{main_midnight}%" ) );
?>

, then it's basically saying that you have no language entry called "main_midnight".

If you are using a variable to specify the lang entry, make sure that the var is valid (case sensitive). Also post the code around the error and we'll see what we can do
This thread is closed

Config help
(1112 posts, closed, started )
FGED GREDG RDFGDR GSFDG