The online racing simulator
Searching in All forums
(31 results)
1
Dedicated server randomly visible from ther server list
iOL(Qc)
S2 licensed
Hi,
I have a dedicated server that runs LFSlapper. Today, i told a friend to come in my server for a race. My server was empty, i saw it in the master server list and i joined. But my friend was not able to find it in the list so i told him to find my username. Then he was able to join. Couple minutes later i left the server to see if i could see it in the list and i couldnt. So i join using the specific server name without problems.

So the server is operational but is not always displayed by the master list. How can i fix this?
Thx guys.
iOL(Qc)
S2 licensed
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 .
Last edited by iOL(Qc), .
iOL(Qc)
S2 licensed
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
iOL(Qc)
S2 licensed
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
iOL(Qc)
S2 licensed
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
Last edited by iOL(Qc), .
iOL(Qc)
S2 licensed
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
iOL(Qc)
S2 licensed
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
Reaction time
iOL(Qc)
S2 licensed
Great tips !
Quote from Yisc[NL] :To get the actual times, use this: NumToMSH()

Quote from Krayy :Time to learn a bit more. As GLscript is an
interpreted language, try to limit the number of system calls you do.

My scripting take's shape.

Now i want to process RT.

I was looking for something like:


<?php 
Event OnGreenLight
($UserName # Possible to make this as a player Event?
WHILE (ToInt(GetCurrentPlayerFunctionReturn(GasIsPressed())) != 1)
$reactionTime StartCounting();
ENDWHILE
...
?>

Is there another way to do this, should it be in the next release or am i dreaming?

Olivier
iOL(Qc)
S2 licensed
Quote from Krayy :Try using the ToNum function inside your IF statements to cast the operands to numerics. Lapper has a tendancy to assume that vars are strings rather than numbers when doing compares.

Thank's a lot for this tip! It should be in LFSlapper.lpr commentary headers?

Now im making something similar and i have another problem.

I want to use GetCurrentPlayerVar("Split1") in time format like minutes:seconds.therest when comes the time to display it.
Right now my variable is something like 29410.
I tryed a splitToArray but i have no token to use.
I also tried variableName[$i] like in c but had no results.

How should i do this?


<?php 
Event OnSplit1
$userName # Player event
IF(ToNum(GetCurrentPlayerVar("sp1")) == 0)
THEN
setCurrentPlayerVar
"sp1",ToNum(GetCurrentPlayerVar("Split1")));
$tData SplitToArrayToNum(GetCurrentPlayerVar("sp1")),"?");
dumpVar($tData);
ENDIF
IF (
ToNum(GetCurrentPlayerVar("sp1")) != && ToNum(GetCurrentPlayerVar("Split1")) > ToNum(GetCurrentPlayerVar("sp1")))
THEN
$difference 
ToNum(GetCurrentPlayerVar("Split1")) - ToNum(GetCurrentPlayerVar("sp1"));
setCurrentPlayerVar"sp1",ToNum(GetCurrentPlayerVar("Split1")) );
privMsglangEngine"^7First split difference: ^2-{0}",ToNum($difference)));
ENDIF
IF (
ToNum(GetCurrentPlayerVar("sp1")) != && ToNum(GetCurrentPlayerVar("Split1")) < ToNum(GetCurrentPlayerVar("sp1")))
THEN
$difference 
ToNum(GetCurrentPlayerVar("sp1")) - ToNum(GetCurrentPlayerVar("Split1"));
privMsglangEngine"^7First split difference: ^1+{0}",ToNum($difference)));
ENDIF
?>

EDIT: I'm learning a lot doiing this!

Olivier
Last edited by iOL(Qc), .
Strange?
iOL(Qc)
S2 licensed
Hi, something is strange, take a look at the picture and the code.


[SIZE=2]Sub DisplaySpeed( $userName )[/SIZE]
[SIZE=2]$topSpeed = GetCurrentPlayerVar("topSpeed");[/SIZE]
[SIZE=2]$instantSpeed = GetCurrentPlayerVar("InstantSpeed");[/SIZE]
[SIZE=2]globalMsg ("^7DEBUG: current player topSpeed = " . $topSpeed);[/SIZE]
[SIZE=2]globalMsg ("^7DEBUG: current player instant Speed = " . $instantSpeed);[/SIZE]
[SIZE=2]globalMsg ("^7DEBUG: IF " . $topSpeed . " is zero : display first pass");[/SIZE]
[SIZE=2]IF ($topSpeed == 0)[/SIZE]
[SIZE=2]THEN[/SIZE]
[SIZE=2]setCurrentPlayerVar( "topSpeed",$instantSpeed );[/SIZE]
[SIZE=2]$topSpeed = GetCurrentPlayerVar("topSpeed");[/SIZE]
[SIZE=2]privMsg( langEngine( "First Pass: ^3{0} ^7{1} " , $instantSpeed,GetCurrentPlayerVar("UnitSpeed") ) );[/SIZE]
[SIZE=2]ENDIF[/SIZE]
[SIZE=2]globalMsg ("^7DEBUG: ^7IF " . $topSpeed . " not zero and (" . $instantSpeed . " > " . $topSpeed .") : display New" );[/SIZE]
[SIZE=2]IF ($topSpeed != 0 && $instantSpeed > $topSpeed)[/SIZE]
[SIZE=2]THEN[/SIZE]
[SIZE=2]$difference = $instantSpeed - $topSpeed;[/SIZE]
[SIZE=2]setCurrentPlayerVar( "topSpeed",$instantSpeed );[/SIZE]
[SIZE=2]$topSpeed = GetCurrentPlayerVar("topSpeed");[/SIZE]
[SIZE=2]privMsg( langEngine( "New top speed: ^3{0} ^7{1} ^2+{2}",$topSpeed,GetCurrentPlayerVar("UnitSpeed"),$difference));[/SIZE]
[SIZE=2]ENDIF[/SIZE]
[SIZE=2]globalMsg ("^7DEBUG: IF " . $topSpeed . " not zero and (" . $instantSpeed . " < " . $topSpeed . ") : display Speed" );[/SIZE]
[SIZE=2]IF ($topSpeed != 0 && $instantSpeed < $topSpeed)[/SIZE]
[SIZE=2]THEN[/SIZE]
[SIZE=2]$difference = $topSpeed - $instantSpeed;[/SIZE]
[SIZE=2]privMsg( langEngine("Speed: ^3{0} ^7{1} ^1-{2}",$instantSpeed,GetCurrentPlayerVar("UnitSpeed"),$difference));[/SIZE]
[SIZE=2]ENDIF[/SIZE]
[SIZE=2][SIZE=2]EndSub[/SIZE]
[/SIZE]

(Ignore the fastess speed trap thing)


Speed is displayed but it should be New top speed!

I'v tryed :

IF ()
THEN
...
ELSE IF ()
THEN
...
ENDIF

With or without the space between the ELSE and the IF, had no result.

Any ideas?

EDIT: As soon as the instant speed is higher then 100 it does this bug.

Olivier
Last edited by iOL(Qc), .
iOL(Qc)
S2 licensed
problem solved: the only version that work for me is 5.926

I use windows 7

Olivier
iOL(Qc)
S2 licensed
I reinstalled the same version now :5.841. Yesterday i downloaded the 5.716 in an hurry wich seems very different that's why i was so confused.
But now i cant even start the lapper. In lfs i have the message LFS Lapper In Stand By state. There is no error messages.

(I think at the first launch i had a message like can't connect to 127.0.0.1 in console.) But now nothing.

Here is the log
LFSLapper-MSS.log:
6/6/2010 11:41:19 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:42:08 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:43:02 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:45:34 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:51:35 AM -> Started - LFSLapper Version=5.8.4.1

EDIT: LFSLapper.exe is added in my firewall exceptions.
EDIT: I'v set the LFSserver.cfg to autowork and i have a lapper instance abord
LFSLapper-MSS.log:
15/02/2010 21:18:37 -> Not a connexion packet! Close connection




What am i doiing wrong?


Olivier
Last edited by iOL(Qc), .
Version just changed?
iOL(Qc)
S2 licensed
I'm about to show my work on the lapper to friends when i have errors leading to stand-by mode.

Everything worked great just before i went to eat about an hour ago.

I redownload the lapper, and see that its a new version.
Could this be the cause of all the sudden error's?

There is no more: Sub DisplaySpeed( $userName ) , so i cant use: RegisterNodeAction( "XXX" , 300 , DisplaySpeed,ExitDisplaySpeed );
I tryed to create it and got error's.
Node's does not exist anymore?
We cannot create variables no more?

My work seems unusable now?

What am i suposed to do?
Im confused.


I had:

Sub DisplaySpeed( $userName )
$topSpeed = GetCurrentPlayerVar("topSpeed");
$speed = GetCurrentPlayerVar("InstantSpeed");
IF ($topSpeed == 0)
THEN
setCurrentPlayerVar( "topSpeed",$speed );
$topSpeed = GetCurrentPlayerVar("topSpeed");
privMsg( langEngine( "^7Première passe: ^3{0} ^7{1} " , $speed,GetCurrentPlayerVar("UnitSpeed") ) );
ENDIF
IF ($topSpeed != 0 && $speed > $topSpeed)
THEN
$difference = $speed - $topSpeed;
setCurrentPlayerVar( "topSpeed",$speed );
$topSpeed = GetCurrentPlayerVar("topSpeed");
privMsg( langEngine( "^7N o u v e a u t o p s p e e d: ^3{0} ^7{1} ^2+{2}",$topSpeed,GetCurrentPlayerVar("UnitSpeed"),$difference));
ENDIF
IF ($topSpeed != 0 && $speed < $topSpeed)
THEN
$difference = $topSpeed - $speed;
privMsg( langEngine("^7Vitesse: ^3{0} ^7{1} ^1-{2}",$speed,GetCurrentPlayerVar("UnitSpeed"),$difference));
ENDIF
EndSub
Sub ExitDisplaySpeed( $userName )
PrivMsg( "Sorti du Speedtrap" );
/* 302 to 1019
$listOfPlayers = GetListOfPlayers();
$currTopSpeed = GetStoredValue( "GlobaltopSpeed" );
$newTopSpeed = 0;
FOREACH( $currUname IN $listOfPlayers )
{
$currTopSpeed = getPlayerVar( $currUname,"topSpeed" );
IF($currTopSpeed > $newTopSpeed)
{
$newTopSpeed = $currTopSpeed;
$unit = GetPlayerVar( "$currUname","UnitSpeed" );
$nom = getPlayerVar( "$currUname","NickName" );
}
ENDIF
}
ENDFOREACH
IF($newTopSpeed > GetStoredValue( "GlobaltopSpeed" ))
{
SetStoredValue( "GlobaltopSpeed", $newTopSpeed );
globalMsg( langEngine( "F a s t e s s s p e e d t r a p: {0} {1}{2}", $nom,$newTopSpeed,$unit ) );
}
*/
ENDIF
EndSub
Event OnLapperStart()

RegisterNodeAction( "BL1" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL1R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL2" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL2R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE1" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE1R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE2" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE2R" , 300 , DisplaySpeed,ExitDisplaySpeed );
...

Last edited by iOL(Qc), . Reason : node ?
iOL(Qc)
S2 licensed
sju said:
Quote :All what it do is telling: LFSLapper go in Work State.

From LapperInstance.cs
else if (infos.autoStart == infoInstance.autoStartVal.AUTO_WORK)
{
#region workMode
openStbMode();
SendMsg("[B][SIZE=3]LFSLapper go in Work State[/SIZE][/B]");
...
}

I think you gotta wait for Gai-Luron's help for this

I also have 3 little questions for you Gai-Luron !

Event OnRaceStart( $NumP ) # Lapper event
SetStoredValue( "GlobaltopSpeed", 0 );
$ListOfPlayers = GetListOfPlayers();
FOREACH( $CurrUname IN $ListOfPlayers )
{
[SIZE=3][B]setPlayerVar( $CurrUname, "topSpeed",0 );[/B][/SIZE]
}
ENDFOREACH
EndEvent

1. Does the overload: setPlayerVar( $CurrUname, "topSpeed",0 ); exist?

EDIT: A simple

FOREACH( $CurrUname IN $ListOfPlayers )
{
...
}
ENDFOREACH

Give's me Errors Illegal character <{> and <}> ?? What is the problem?

I also tryed

FOREACH( $CurrUname IN $ListOfPlayers )
...
BREAK;
ENDFOREACH

And it does not go pass the loop.

2. What language am i coding (in LFSLapper.lpr)?? Python, php...? (as you can see im a beginner in programming)

3. Does LFS was made in c# ?


To everybody else: I'v found where to look for to find all functions, look in
scriptFunctions.cs

To Gai Luron: As i saw your from Paris, France you can pm/write me in french, je suis Québecois!

I started studing computer science last year and i think that what im doiing on this give's me great skills for my next years at school.
I really appreciate you help Gai Luron.

Olivier
Last edited by iOL(Qc), . Reason : Thank's
iOL(Qc)
S2 licensed
sju said:
Quote :Any ideas to get it work?

Did you set the insim to the specified port? (by defaut 29999)

You need to be admin of the server and type:
/insim 29999

While in-game.

Hope it solve your problem!

Olivier
iOL(Qc)
S2 licensed
Thanks a lot sinanju for the arrays tip! It would be very nice if you could post a zipped file of all the sample that you have, cause i cant find any.

Gai-Luron said:
Quote :There are another functions, look in config file

It seems that i cant find the descriptionand usage of the other functions, where should i look?

Now i want to compare all the current player topSpeed
I'dd use a for loop like:

for($i = 0, $i < getLapperVar( totalPlayers ), $i = $i +1)
{
$topSpeed = 0;
$playerTopSpeed = GetPlayer[i]Var("topSpeed");
IF($playerTopSpeed > $topSpeed)
{
$playerName = GetPlayerVar( player[i], "NickName" )
$newTopSpeed = $playerTopSpeed;
}
}
IF($newTopSpeed>globalTopSpeed)
{
setLapperVar( "GlobaltopSpeed",$newTopSpeed );
globalMsg( langEngine( "N o u v e a u T o p S p e e d: {0} driver: {1}", $newTopSpeed,$playerName));
}

It know that those: getLapperVar( totalPlayers ), player[i], getPlayer[i]Var("topSpeed"), GetPlayerVar( player[i], "NickName" ) and setLapperVar( "GlobaltopSpeed",$newTopSpeed ), does not exist, i dont know where to find informations on the right syntax to use.

What is the good syntax?/ Where should i look to find my answers?

Thanks Gai-Luron!
I appreciate the lapper a lot.

Olivier
basic RegisterNodeAction problem
iOL(Qc)
S2 licensed
Hi, i juste discovered LFS lapper and airio and i choose to use the lapper! I want to do something very simple, but i must miss something. I have : RegisterNodeAction( "BL1" , 300 , DisplaySpeed,ExitDisplaySpeed ); that call's: DisplaySpeed and ExitDisplaySpeed.

I want that in the first use of the function DisplaySpeed, only the speed is displayed, for the other DisplaySpeed using i want to compare the speed and the top speed to set topSpeed and display a message accordingly.

Here what i did:

Quote :Sub DisplaySpeed( $userName )
----------$speed = GetCurrentPlayerVar( "InstantSpeed" );
IF($i==1)
THEN
----------$topSpeed = $speed;
----------privMsg( "^7>Vitesse: ( ^3" . $speed . " ^7) km/h");
----------$i = $i +1 ;
ELSE IF ($speed > $topSpeed)
THEN
----------$ancien = $topSpeed;
----------$topSpeed = $speed;
----------privMsg( "^7>Nouveau Top speed1 ( ^3" . $TopSpeed . " ^7) km/h");
ELSE
----------privMsg( "^7>Vitesse: ( ^3" . $speed . " ^7) km/h");
ENDIF
EndSub

I'll use the $ancien (previous top speed) after resolving this..
The problem is that i dont know where to instance my $i variable ($i represent the # of times the function have been called) so it can be set outside the DisplaySpeed function otherwise it get's overwrited. I tryed to instance the $i in many places in the LFSlapper.lpr. Never got it working. (i tryed privMsg( "^7>( ^3" . $i . " ^7) "); to chek the $i value and it was ( ), empty)

I would need help please.
I think ill be able to code some very great ideas as soon as i figure out some details about the lapper.

ty

Olivier, Canada
Last edited by iOL(Qc), . Reason : $ancien
iOL(Qc)
S2 licensed
Quote from Matt0snap :don't know why they are DDS, but a lot of those skins are private. you should delete all the skins you copied over and make sure u are allowed to use them first...

Allowed or not i cant use those DDS at all?!
iOL(Qc)
S2 licensed
Quote from Gunn :The skins folder is for JPG files. Additionally, you shouldn't assume that the skins in the skins_x folder are yours to use freely. Many will be team skins and some will be personal skins.

ok but files in the skins_x folder are all dds, why?
iOL(Qc)
S2 licensed
They are all dds files from the skins_x folder and iv tryed with only 1 FBM skin , no result . Iv never had this problem before patch y
ok i see i cant use dds :S but where are public skins ?
Last edited by iOL(Qc), .
Cant see any skin??
iOL(Qc)
S2 licensed
Hi, i just pasted many skins (830) in my lfs/data/skins folder. I did all that have been said here http://www.lfs-gear.com/TUTORIALS/TuT_UseSkin.html and it still dont work cant see any skins name? help please???
Wr Replays
iOL(Qc)
S2 licensed
Hi, i searched but found nothing about it..
I would like to know if there is any place we can download WR replays ? Or something like that. I saw lfs WR videos on youtube for example but it dont give enough infos. I saw something about analyze for speed but the link was broken.



I need help on this please/thank you
iOL(Qc)
S2 licensed
I ordered another modem/router from bell , the speedstream 6520 i cant figure how to forward port on the 4200 but the one ill get in about 5 day have the port setting but for 79,95$..
iOL(Qc)
S2 licensed
Quote from the_angry_angel :MSN can work without listening on a public IP, as can bittorrent. However, assuming I'm reading this correctly (and it's the right router I've got up), your modem does support forwarding. You might want to take a look at this?

I had already read almost all this file from siemen and a lot of forums but its not the same interface look here is a screenshot of the menu that i get from my modem config page (from another user but same thing)http://membres.lycos.fr/iown/1.JPG , http://membres.lycos.fr/iown/2.JPG ? I want to open port from server side its not illegal.. ty for helping
Last edited by iOL(Qc), .
my modem block all port
iOL(Qc)
S2 licensed
hi, it seems that my speedstream 4200 modem block all port (but i can send and receive files in msn or bitcomet..) In this modem menu (192.168.2.1) there is no port forwarding or anything related with ports. It only have status with some info and reset. but its sure that i can do something about it maybe using telnet or hyperterminal? i really need help
1
FGED GREDG RDFGDR GSFDG