The online racing simulator
Hi Yisc, thanks matey I was using GetStoredValue instead of GetUserStoredValue damn lol

Thank You
Andy
Thanks Yisc
Has RegisterNodeAction been changed? as this won't work.....
RegisterNodeAction( "AS3" , 103 , DisplaySpeed_1 );
RegisterNodeAction( "AS3" , 447 , DisplaySpeed_2 );

Andy
Check if the sub callback is right

Sub DisplaySpeed_1($userName,$NodeID)
#yourcode
EndSub

The ID can be used to use multiple Zone/Node Actions within the same subcallback
RegisterNodeAction ("NodeID_01","AS1", 123, RadarTrap1, "" );
RegisterZoneAction ("ZoneID_01", "BL1", -40,123, 5 , RadarTrap1, "" );

Sub RadarTrap1($userName,$ID)
IF($ID == "NodeID_01") THEN

ENDIF
IF($ID == "ZoneID_01") THEN

ENDIF
EndSub

Quote from Bass-Driver :Check if the sub callback is right

Sub DisplaySpeed_1($userName,$NodeID)
#yourcode
EndSub

The ID can be used to use multiple Zone/Node Actions within the same subcallback
RegisterNodeAction ("NodeID_01","AS1", 123, RadarTrap1, "" );
RegisterZoneAction ("ZoneID_01", "BL1", -40,123, 5 , RadarTrap1, "" );

Sub RadarTrap1($userName,$ID)
IF($ID == "NodeID_01") THEN

ENDIF
IF($ID == "ZoneID_01") THEN

ENDIF
EndSub


This still won't work Dan doing my head in lol

Andy
Offtopic:

I moved some posts about the Lappers database into a new topic in the Tutorial section.
Hi Dan, I don't think it likes ODD Numbered Nodes lol as changed both to Even and it started working.

Andy
Hi Guys is their a DELAY or WAIT feature in Lapper so I can send a Message to Restart Lapper with !Reload but then ask it to wait 10 seconds before it actually reloads?

Also can the IF command be used to include or exclude Include Files?

Andy
If you go to the 'doc' folder in your Lapper directory. You see several textfiles, that contains lists with functions and event that are currently available in LFSLapper.
Then use the searchbutton on the forum to find some examplecodes.

Here's a list with delayedcommands.
The delays are in seconds.

removeprivdelayedcommand();
privdelayedcommand();
removehostdelayedcommand();
hostdelayedcommand();
removedelayedcommand();
delayedcommand();

No its not possible to enable/disable Includes when lapper is running.
You have to disable it manually and reload lapper.
Hi Guys, whats changed as this won't work or am I missing something?

NumToMSH(GetCurrentPlayerVar("SectorSplit1"))

Andy
-Do you get any errormessages??
-Does the code work before that line?

What i can see is you forgot a ';' behind it.
Hi Dan, I've fixed my script was missing $userName from OnSplit1($userName)etc etc lol.

Right onto SpeedTraps - got them working fine in km/h but my unit of speed is mph which they won't show in as ignoring my LFS Setting of mph how do I fix it with using tomph() please


$Speed_1 = GetCurrentPlayerVar("InstantSpeed");
$Speed_Unit_1 = GetCurrentPlayerVar("UnitSpeed");
$Speed_Best_1 = GetUserStoredValue("SpeedTrap_1");

cmdLFS("/msg " . $NickName . " ^2SpeedTrap 1 ^3= ^6" . $Speed_1 . " ^7" . $Speed_Unit_1);

Thanks
Andy
Syntax for ToMph is: ToMph( value )

So I think that this should work: $Speed_1 = ToMph( GetCurrentPlayerVar("InstantSpeed") );
Hi Yisc, does that still work?

GetCurrentPlayerVar("UnitSpeed")

EDIT:
Yes it does sort of but only shows km/h which isn't my Unit Of Speed as its mph

Andy
If I remember well, you can configure your unitspeed within Lapper.
Let me quickly search if I can find how to do that.

*edit*
Found it: Now Player can do the choice of display Speed Unit in config screen ( Shift + i )
Hi Yisc, thanks but Shift+i won't work on my Lapper for some reason but will look into it cheers.

Andy
Hi Guys, give up can anyone help me with whats required in Lapper for SHIFT+i to work plz lol

Andy
Hi Guys, this also doesn't work.....

$Posabs = GetCurrentPlayerVar("PosAbs");

Any Ideas has it changed?

Andy
Quote from Andy King :Hi Guys, this also doesn't work.....

$Posabs = GetCurrentPlayerVar("PosAbs");

Any Ideas has it changed?

Andy

If you want to know if something has changed or not, you can always consult the file 'changes.txt' which can be found in the "doc" folder.
You can also find all PlayerVars in file 'Player Vars.txt'

Var "PosAbs" is listed in there, so should be availabe.
Your syntax looks okay: GetCurrentPlayerVar( "PosAbs" )
So maybe the event where you have that code is never reached or there is a problem in that particular event, stopping Lapper before it reaches that line.
Such things can easily be checked by consulting the log-file that can be found in folder "bin\logs" and ends with ERR.log (like this: LFSLapper-ERR.log)
The above comment pointed to the general log-file, which is not usuful for debugging.
The one needed is found in "bin\default\logs" and also ends with ERR.log (like this: 127.0.0.1-29999-ERR.log)

Another way of checking if the PlayerVar has a value, is dumping the output to the Lapper console using this: writeline ( "DEBUG: " . GetCurrentPlayerVar( "PosAbs" ) );
Hi Yisc, sorry for late reply Mum taken ill, its was a capitalisation issue with the A in PosAbs lol.

I still can't work out how to get SHIFT+i working on my servers does anyone have any ideas plz.

Andy
I have had a quick look, but cannot find where to activate the feature.
Maybe it's not longer active in Lapper, but the only person that can say something about that is Bass-Driver.
Havent change anything with Shift+I.
ill go take a quick look into the sourcecode.

edit: function should be myconfig();

CASE "!myconfig":
myConfig( );
BREAK;

Cheers Dan got it now

Andy
Hi Dan, "hostnamestripped" would be very useful when running more than 1 server

Andy
Quote from Andy King :Hi Dan, "hostnamestripped" would be very useful when running more than 1 server

Andy

There is already an option called: StripLFSColor
I cannot see a reason why that wouldn't work on the hostname, like this:

$var = StripLFSColor( GetLapperVar("hostname") );
Cheers Yisc works perfectly

Andy

FGED GREDG RDFGDR GSFDG