The online racing simulator
THX mate, this solved my problem !
I cant make workable this method.

<?php 
$DriftPB 
GetCurrentPlayerVar("PBDrift");
?>


<?php 
main_welc3 
=  "^7Your highest Drift Score (with this vehicle): ^2{0}";
?>


<?php 
$DefaultTopCar 
"XRG+XRT+LX4+FXO+FZ5";
?>


<?php 
openPrivButton
"ref",40,110,120,10,8,-1,ISB_DARK,langEngine("%{main_welc3}%",$DriftPB  ));
?>

All is set but at the welcome doent shows the score just 0 !

P.S.: I dont know why but the lapper close this 4 name of button

Quote :closePrivButton("welc&pos&clos&ref");

If i rename ex. the ref to ref1 and i modify in closepriv. doesnt close the button. There is any exception of closing buttons o.O ?
Attached images
drf.png
My immediate guess here is that as the user is a new connection, it has not registered that they have chsoen a car yet.

To test this out, write a short test command to do your code to the chat window using privMsg
There is any way to disable voting to restart, end or qualify ?
You don't need to do it via LFSLapper as it can be done via LFS Host command -

/vote X (where X = yes or no)

This is the command that allows / disallows guest voting.

LFS Host commands can be found HERE
How to make the command that if someone go in a restricted area after its automaticaly pitlane the driver ...
Quote from sarxes :How to make the command that if someone go in a restricted area after its automaticaly pitlane the driver ...

In 2 parts -

1st, set a zone (your area) that when entered triggers a sub-routine, e.g.


<?php 
RegisterZoneAction
"NoEntryArea""AU1" , -100100 SR_PitDriver );
?>

(this would cause an area 5m x 5m to be a 'trigger' point- make the 5 bigger or smaller to suit, or, alternatively, have multiple RegisterZoneActions with different locations but the same sub-routine)

2nd, your sub-routine - e.g.


<?php 
Sub SR_PitDriver
$userName # Player event
    
privMsg(  "You have been pitted for entering a restricted area.";
    
cmdLFS("/pitlane " GetCurrentPlayerVar("UserName") );
EndSub
?>


Without making a register zone its not possible ? Lapper cant recognize the restricted area made by LFS in layout build ?
Zones exist in the AutoX layout, but not Nodes.

Type !zone and !node in your layout to see what numbers you get.
Quote from sinanju :Zones exist in the AutoX layout, but not Nodes.

Type !zone and !node in your layout to see what numbers you get.

I mean the LFS restricted area created by LFS developers not by lapper !
hi can anyone help please how do i remove the clean racing and have fun messege just before a race starts lapper is installed on a server from 500 servers but i cant find the option to remove the messege in the LfsLapper.lpr file is the messege somewere else

thanx
Quote from capris :hi can anyone help please how do i remove the clean racing and have fun messege just before a race starts lapper is installed on a server from 500 servers but i cant find the option to remove the messege in the LfsLapper.lpr file is the messege somewere else

thanx

It will be in the pitboard.lpr file in the includes folder. Just comment it out by prefixing with a hash
Quote from Krayy :It will be in the pitboard.lpr file in the includes folder. Just comment it out by prefixing with a hash

thanx for that works fine

another question i ask is when a race has finished is there a way of having a countdown timer on screen before the next race starts from 40 seconds down to 0


at the moment i have the 40 second countdown but it does not show anything on screen
Quote from capris :thanx for that works fine

another question i ask is when a race has finished is there a way of having a countdown timer on screen before the next race starts from 40 seconds down to 0


at the moment i have the 40 second countdown but it does not show anything on screen

I do have a countdown timer in one of my cif modules for running race events although its not complete yet.

Have a look at any code that uses the openGlobalButton function to open a button and use the %cpt% variable to do the countdown something like this:


<?php 
      openGlobalButton 
("test",60,95,80,10,5,6,16,"^7Track will be changed in (%cpt%) second(s)");
      
DelayedCommand5change_track_2 );
?>

hi

How to inplement japanese characters into a txt file and which fileformat do i use.

I have tried UTF-8 , UTF-16 etc nothing works. it gives ?????
The program i use is PSPAD.
Attached images
japchars.jpg
I would like two permissons to have access to the same command code, but how much i've tried to make this, i've failed. I want normal admins AND eventusers to be able to execute this...

Original code snippet:
CASE "!clear":
IF ( UserIsAdmin( $userName ) == 1 )
THEN
cmdLFS( "/axclear" );
ELSE
privMsg("You don't have enough access to execute this command!");
ENDIF
BREAK;

Tried this: (But gives EVERYONE access)
UserGroupFromFile( "eventusers", "./eventusers.txt" );
IF( UserInGroup( "eventusers",$userName) OR ( UserIsAdmin( $userName ) == 1 ) )

What am i doing wrong? Help please.
Quote from NovaK :I would like two permissons to have access to the same command code, but how much i've tried to make this, i've failed. I want normal admins AND eventusers to be able to execute this...

Original code snippet:
CASE "!clear":
IF ( UserIsAdmin( $userName ) == 1 )
THEN
cmdLFS( "/axclear" );
ELSE
privMsg("You don't have enough access to execute this command!");
ENDIF
BREAK;

Tried this: (But gives EVERYONE access)
UserGroupFromFile( "eventusers", "./eventusers.txt" );
IF( UserInGroup( "eventusers",$userName) OR ( UserIsAdmin( $userName ) == 1 ) )

What am i doing wrong? Help please.

You might want to check your error log and see if there is a message about using "OR" instead of ||. Try this:

UserGroupFromFile( "eventusers", "./eventusers.txt" );
IF ( UserInGroup( "eventusers",$userName) == 1 || UserIsAdmin( $userName ) == 1 )

failing taht, use the "!ma" command to load the member admin screen and raise the users rights to Admin
hi

today i tried to add a playervar : reading the users numberplate

i have changed couple of files and compiled the project and overwrote the lapper.exe but it doesnt work.

ill show you what i changed:

In GLSplayervars.cs :
i added NumberPlate, in enum playerVars list.

I added also in public void GetVarPlayer(GLScript.unionVal val, string idVar, string userName) function

case "numberplate":
val.typVal = GLScript.typVal.str;
val.sval = utils.quote(currInfoPlayer.Plate);
SendMsg("(Debug) Read NumberPlate");
break;

in infoPlayer.cs , i added in public class infoPlayer

public string Plate;



in the LPR files itself i added the command:

CASE "!pl":
privMsg( "^7Plate: " .GetPlayerVar( $userName, "NumberPlate" )); BREAK;

did i forgot something?? i think its something small


the only text i see is : host: (Debug) Read NumberPlate
Most obviously is that you are not assigning the value anywhere. If you have alook for the value Plate in the InSim5.txt file (which details all of the insim functions), you will see that the Plate variable exists in the NPL (New Player), RES (Result) and CPR (Connection player rename) so what you will need to do is set the Players Plate variable in the relevant function in the managepacket.cs file i.e.:


<?php 
        void managePacket
(InSim.Decoder.NPL newPlayer)
        {
...
            
currInfoPlayer.OnTrack true;
            
currInfoPlayer.Plate newPlayer.Plate;
...
?>

Now you have a value that you can use in your script. I might as well throw this into the codebase as it may come in useful.

P.S. Just put it in and tested it and it all works correctly. Note that the plate will not be valid until the player joins a race, as that's when the NPL InSim packet is sent, not when they connect which is NCN. I also treid renaming my plate (which returns a CPR packet) and that worked as well.

Will post it soon.
Quote from Bass-Driver :hi
...
in the LPR files itself i added the command:

CASE "!pl":
privMsg( "^7Plate: " . GetPlayerVar( $userName, "NumberPlate" )); BREAK;

did i forgot something?? i think its something small


the only text i see is : host: (Debug) Read NumberPlate


CASE "!pl":
privMsg( "^7Plate: " . GetCurrentPlayerVar( "NumberPlate" ));
BREAK;

i have tried that but nothing happends

ill go change the code later and also try to implement to set the users SkinName.

Idea to make a protection:
Protection for wearing someones teamskin if you are not in a team.
Quote from Bass-Driver :i have tried that but nothing happends

ill go change the code later and also try to implement to set the users SkinName.

Idea to make a protection:
Protection for wearing someones teamskin if you are not in a team.

I've put the numberplate code into the latest realease of 6.014, so grab it from the thread and have a play.
need help with lapper
ok lets see who can help with a few thing I need lapper to do

1st how do I make lapper start a race event (ie close server and password it and set up to do 2 races 1 race normal grid 1 race reverse grid)

2nd get the license system working so the I can have 6 licenses from beginner to pro legend for all drivers that do a lap on server

3rd turn off all friendly postion stuff and remove it from ist display screen

4th a little program called race nextrace v1 by a user starblue can be used so the a driver can reg for a race on a date event listed could the file that keeps the reg user for the event be added to lapper so that when lapper closes the server and passwords it only these reg drivers can go on the server

5th when lapper closes the server for a race event only registed drivers can get on server

please help someone willing to donate I cash or even a free server
This thread is closed

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