The online racing simulator
LFSLapper insim4 Release
(2101 posts, closed, started )
Quote from santeXFz :Hello guys. I`m getting Syntax error when writing this.
Event OnRotateTrack()
[I] IF ($CurrRotateTrack == "SO6R")
THEN
cmdLFS("/laps 7");
ENDIF[/I]

cmdLFS("/msg ^7Trasa pakeista, prasome palaukti !" );
cmdLFS("/msg ^7Dabartine trasa : ^6" . $CurrLongRotateTrack);
EndEvent

Whats wrong ?

I can't see any mistake, check the lines above and below this event.
Hello again. I`m done my Football insim (LFSLapper). It have score board, admin panel controling by buttons. Have fun with it.

Event OnConnect()
openGlobalButton("tm1",60,1,30,7,7,-1,32,"^7WHITE TEAM");
openGlobalButton("vs",95,1,10,6,6,-1,32,"^2VS");
openGlobalButton("tm2",110,1,30,7,7,-1,32,"^1RED TEAM");
EndEvent


$UseUsernameForAuthentication = true;

Sub Click_w1()
closeGlobalButton( "w0&w00");
openPrivButton( "w01",193,170,5,5,5,-1,16,"^71");
openGlobalButton( "w1",91,1,4,7,7,-1,32,"^71");
EndSub

Sub Click_r1()
closeGlobalButton( "r0&r00");
openGlobalButton( "r1",105,1,4,7,7,-1,32,"^11");
openPrivButton( "r01",193,175,5,5,5,-1,16,"^11");
EndSub

Sub Click_w2()
closeGlobalButton( "w1&w01");
openGlobalButton( "w2",91,1,4,7,7,-1,32,"^72");
openPrivButton( "w02",193,170,5,5,5,-1,16,"^72");
EndSub

Sub Click_r2()
closeGlobalButton( "r1&r01");
openGlobalButton( "r2",105,1,4,7,7,-1,32,"^12");
openPrivButton( "r02",193,175,5,5,5,-1,16,"^12");
EndSub

Sub Click_w3()
closeGlobalButton( "w2&w02");
openGlobalButton( "w3",91,1,4,7,7,-1,32,"^73");
openPrivButton( "w03",193,170,5,5,5,-1,16,"^73");
EndSub

Sub Click_r3()
closeGlobalButton( "r2&r02");
openGlobalButton( "r3",105,1,4,7,7,-1,32,"^13");
openPrivButton( "r03",193,175,5,5,5,-1,16,"^13");
EndSub

Sub Click_w4()
closeGlobalButton( "w3&w03");
openGlobalButton( "w4",91,1,4,7,7,-1,32,"^74");
openPrivButton( "w04",193,170,5,5,5,-1,16,"^74");
EndSub

Sub Click_r4()
closeGlobalButton( "r3&r03");
openGlobalButton( "r4",105,1,4,7,7,-1,32,"^14");
openPrivButton( "r04",193,175,5,5,5,-1,16,"^14");
EndSub

Sub Click_w5()
closeGlobalButton( "w4&w04");
openGlobalButton( "w5",91,1,4,7,7,-1,32,"^75");
openPrivButton( "w05",193,170,5,5,5,-1,16,"^75");
EndSub

Sub Click_r5()
closeGlobalButton( "r4&r04");
openGlobalButton( "r5",105,1,4,7,7,-1,32,"^15");
openPrivButton( "r05",193,175,5,5,5,-1,16,"^15");
EndSub

Sub Click_reset()
closeGlobalButton( "w0&w00");
closeGlobalButton( "w1&w01");
closeGlobalButton( "w2&w02");
closeGlobalButton( "w3&w03");
closeGlobalButton( "w4&w04");
closeGlobalButton( "w5&w05");
closeGlobalButton( "r0&r00");
closeGlobalButton( "r1&r01");
closeGlobalButton( "r2&r02");
closeGlobalButton( "r3&r03");
closeGlobalButton( "r4&r04");
closeGlobalButton( "r5&r05");
openGlobalButton( "r0",105,1,4,7,7,-1,32,"^10");
openPrivButton( "r00",193,175,5,5,5,-1,16,"^10");
openGlobalButton( "w0",91,1,4,7,7,-1,32,"^70");
openPrivButton( "w00",193,170,5,5,5,-1,16,"^70");
EndSub

Register MsgAction("!meniu",MA_meniu);
Sub MA_meniu()
$allow= ""; #admin License name
openPrivButton("meniu",169,169,30,30,30,-1,32," ");
openPrivButton("tmwhite",170,170,22,5,5,-1,16,"^7WHITE TEAM");
openPrivButton("tmred",170,175,22,5,5,-1,16,"^1RED TEAM");
openPrivButton("wsc",171,181,4,4,4,-1,16,"^7W");
openPrivButton("rsc",171,185,4,4,4,-1,16,"^1R");
openPrivButton("wm1",177,181,4,4,4,-1,16,"^21",Click_w1 );
openPrivButton("rm1",177,185,4,4,4,-1,16,"^21",Click_r1 );
openPrivButton("wm2",181,181,4,4,4,-1,16,"^22",Click_w2 );
openPrivButton("rm2",181,185,4,4,4,-1,16,"^22",Click_r2 );
openPrivButton("wm3",185,181,4,4,4,-1,16,"^23",Click_w3 );
openPrivButton("rm3",185,185,4,4,4,-1,16,"^23",Click_r3 );
openPrivButton("wm4",189,181,4,4,4,-1,16,"^24",Click_w4 );
openPrivButton("rm4",189,185,4,4,4,-1,16,"^24",Click_r4 );
openPrivButton("wm5",193,181,4,4,4,-1,16,"^25",Click_w5 );
openPrivButton("rm5",193,185,4,4,4,-1,16,"^25",Click_r5 );
openPrivButton("res",179,191,10,5,5,-1,16,"^2reset",Click_reset );
openPrivButton("daug",176,192,3,3,3,-1,16,"^2<",Click_more );
openPrivButton("isj",189,192,3,3,3,-1,16,"^1X",Click_isjungti );
EndSub

Sub Click_more()
openPrivButton("daugiau",138,169,30,30,30,-1,32," ");
openPrivButton("back",164,192,3,3,3,-1,16,"^1>",Click_isjungtiMore );
openPrivButton("uzribis",139,170,28,5,5,-1,16,"^2Out",Click_uzribis );
openPrivButton("wk",139,175,14,5,5,-1,16,"^7Ball",Click_wkamuolys );
openPrivButton("rk",153,175,14,5,5,-1,16,"^1Ball",Click_rkamuolys );
openPrivButton("wiv",139,180,14,5,5,-1,16,"^7Goal",Click_wivartis );
openPrivButton("riv",153,180,14,5,5,-1,16,"^1Goal",Click_rivartis );
openPrivButton("pertr",139,185,14,5,5,-1,16,"^2Break",Click_pertrauka );
openPrivButton("prad",153,185,14,5,5,-1,16,"^2Start game",Click_pradedam );
openPrivButton("gam",139,193,20,4,4,-1,0,"^6Made By santeXFz");
EndSub

Sub Click_isjungtiMore()
closePrivButton("daugiau&back&uzribis&wk&rk&wiv&riv&pertr&gam&prad");
EndSub

Sub Click_isjungti()
closePrivButton("meniu&tmwhite&tmred&wsc&rsc&wm1&rm1&wm2&rm2&wm3&rm3");
closePrivButton("wm4&rm4&rm5&wm5&res&daug&isj&daugiau&back&");
closePrivButton("w00&r00&w01&r01&w02&r02&w03&r03&w04&r04&w05&r05");
closePrivButton("uzribis&wk&rk&wiv&riv&pertr&gam&prad");
EndSub

Sub Click_uzribis()
openPrivButton("uz",85,50,30,10,10,5,32,"^2OUT");
EndSub

Sub Click_wkamuolys()
openGlobalButton("wkg",80,40,40,10,10,5,32,"^2Ball goes to ^7WHITE ^2team");
EndSub

Sub Click_rkamuolys()
openGlobalButton("rkg",80,40,40,10,10,5,32,"^2Ball goes to ^1RED ^2team");
EndSub

Sub Click_wivartis()
openGlobalButton("wivb",70,40,60,10,10,5,32,"^3************* ^2GOAL ^3*************");
openGlobalButton("wivb2",80,50,40,10,10,7,32,"^21 pt goes to ^7WHITE ^2team");
EndSub

Sub Click_rivartis()
openGlobalButton("wivb",70,40,60,10,10,5,32,"^3************* ^2GOAL ^3*************");
openGlobalButton("wivb2",80,50,40,10,10,7,32,"^21 pt goes to ^1RED ^2team");
EndSub

Sub Click_pertrauka()
openGlobalButton("pertra",80,40,40,10,10,120,32,"^2BREAK");
openGlobalButton("pertra2",70,50,60,10,10,120,32,"^2You have 2 minutes to repair your car");
EndSub

Sub Click_pradedam()
openGlobalButton("pradedam",70,50,60,10,10,5,32,"^3*** ^2GAME BEGINS ^3***");
EndSub

# Sorry about LT and ENG language mix in code

Quote from Tim NL :In your error massage is a line number.
Open your lpr file in PSPad editor http://www.pspad.com and check that line.

Done. #801 line that means first code line.

[COLOR=Red]Event OnRotateTrack()[/COLOR]
IF ($CurrRotateTrack == "SO6R")
THEN
cmdLFS("/laps 7");
ENDIF

cmdLFS("/msg ^7Trasa pakeista, prasome palaukti !" );
cmdLFS("/msg ^7Dabartine trasa : ^6" . $CurrLongRotateTrack);
EndEvent

Quote from santeXFz :Done. #801 line that means first code line.

[COLOR=red]Event OnRotateTrack()[/COLOR]
IF ($CurrRotateTrack == "SO6R")
THEN
cmdLFS("/laps 7");
ENDIF

cmdLFS("/msg ^7Trasa pakeista, prasome palaukti !" );
cmdLFS("/msg ^7Dabartine trasa : ^6" . $Curr[COLOR=magenta]Long[/COLOR]RotateTrack);
EndEvent


The word long I think is wrong I reckon.
Quote from Andy King :The word long I think is wrong I reckon.

It's part of a variable name which has the '$' sign correctly used, so it cannot be the cause. Tbh, it sounds like the previous event isn't properly closed or this event is in the wrong place (inside another event for example). Also, that variable is defined.
Quote from lfslapper.lpr :List of all variables that can be used in all events

$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

Sorry guys about my posts I found a mistake and that mistake was my foult. I forgot to close event before this event. It`s working now. Sorry again
He Guys, but LFSLapper don't write a log file to check in case of bad connection or problem ?
I launch a lfslapper in a "gaming online" server but he don't work fine.
Server is ok becaus if i try to start a lapper in my house to that server it work fine.
But without a log file i can't check wich are the problem.
Thanks.
Hi agai. I need a little help here. How to make the event like IF someone press "t" THEN /spec . I even don`t know where to add code. Can someone help me with that if it`s possible to do ?

EDIT: Happy birthday Tim NL !
Quote from santeXFz :Hi agai. I need a little help here. How to make the event like IF someone press "t" THEN /spec . I even don`t know where to add code. Can someone help me with that if it`s possible to do ?

You could try:

Register MsgAction("t",MA_tspec);
Register MsgAction("T",MA_tspec);
Sub MA_tspec()
cmdLFS("/spec " . $Nickname );
EndSub


Put it beside all your other Register MsgActions.
Quote from sinanju :You could try:

Register MsgAction("t",MA_tspec);
Register MsgAction("T",MA_tspec);
Sub MA_tspec()
cmdLFS("/spec " . $Nickname );
EndSub


Put it beside all your other Register MsgActions.

Good solution, but with this you need to press t or T and then hit enter.
LFS can simulate a keypress but Lapper can't handle that properly at the moment.
So your solution is the best possible right now.
Quote from sinanju :You could try:

Register MsgAction("t",MA_tspec);
Register MsgAction("T",MA_tspec);
Sub MA_tspec()
cmdLFS("/spec " . $Nickname );
EndSub


Put it beside all your other Register MsgActions.

Ye I was thinking about that but this is not good for me. I need something only by pressing key "t" that means without pressing "Enter".
Quote from santeXFz :Hi again. I need a little help here. How to make the event like IF someone press "t" THEN /spec . I even don`t know where to add code. Can someone help me with that if it`s possible to do ?

The other way would be to make a GlobalButton with sub routine to /spec someone once they press it.

Something everyone will press to see what it does!

Put it under #Connect messages when a player joins the server# part of Lapper.

openGlobalButton( "t_spec",90,1,20,8,4,-1,32,"T",tspec );

Sub tspec()
closePrivButton("tspec");
cmdLFS("/spec " . $Nickname );
EndSub


Haven't tested button.
Quote from sinanju :The other way would be to make a GlobalButton with sub routine to /spec someone once they press it.

Something everyone will press to see what it does!

Put it under #Connect messages when a player joins the server# part of Lapper.

openGlobalButton( "t_spec",90,1,20,8,4,-1,32,"T",tspec );

Sub tspec()
closePrivButton("tspec");
cmdLFS("/spec " . $Nickname );
EndSub


Haven't tested button.

Another good solution but not so nice for people that are driving with a mouse.
Quote from santeXFz :Hi agai. I need a little help here. How to make the event like IF someone press "t" THEN /spec . I even don`t know where to add code. Can someone help me with that if it`s possible to do ?

Might be useful if we knew why someone wanted racer to join spectators when pressing T?

Isn't the "T" the keyboard shortcut for talking ingame - maybe someone doesn't want that?
Quote from sinanju :Might be useful if we knew why someone wanted racer to join spectators when pressing T?

Isn't the "T" the keyboard shortcut for talking ingame - maybe someone doesn't want that?

I`m planing game like destruction derby with "skills" (lol). When u win 1st place u geting 5 pts etc. Firs skill costs ~50 points. Skill description is make harder to win ur oponents. Like i write !smoke and all screen is in Light ( Opening Global Button ) "smoke". But when i pressing "t" that global button disapear and screen is clear. Any ideas how to do it correct ?

( Sorry for my bad English )
Not sure, but i think the button overlay may only disappear for the one pressing buttons, talking or anything else like that, but for the other drivers screen will still show button overlay.

Upon checking, I find as soon as you type in the letter "t", a message box (this reads "Enter message") appears and all the buttons created with Lapper disappear off the screen.

This doesn't happen when you press any of the Lapper buttons.


It's unlikely that when you bring up the message box on your own screen, that you will close the overlay button on other driver's screens at the same time.
But other drivers can open chat too.
Quote from santeXFz :But other drivers can open chat too.

Yes, but it's only the player who opens the chat box that will lose the screen button overlay. Everyone else (I'm assuming in a destruction derby there will be more than 1 car) will still see the overlay.

And as soon as they finish typing their message, and hitting Enter, the overlay will return.
But all drivers can use this "bug". And "skills" have time limit 3-10 seconds.
If you press Shift+I, you're 'smoke' screen is also "deleted" And you can't forbid that...
some bug's
Hi,
I found some bug's and other strangs things in LFSLapper 5.831

Bug 1 : Sometimes if someone drives a new server PB it shows "friendly rank -/-" but when you type !stats or !near the new PB is stored correct in the database.

Bug 2 : In the part Race Control you can set $AutoRestartRaceSec , this works also when the qual starts.
If one person is driving in a qual and press shift-p and drive again , the qual stops and the race will start after the number of the $AutoRestartRaceSec seconds.

Bug 3 : When someone connect and get the welcome screen from the part Event OnConnect() and the person don't click the Enter or Leave Buttons but just Shift-j and the race is in progress the part Event OnNewPlayerJoin() will not work.

Strangs thing 1 : When you use the command " DelayedCommand( 10, OnConnectspec ); " in the section " Event OnConnect() # Player event " , the Subs you call are no longer a player event but a lapper event. So you can't use commands like closePrivButton.

Some other wishes ,
The parts Event OnRaceStart() and Event OnQualStart() are now a Lapper events and change to player events , or a new event that join midrace detect.
Hello Kings :)
Now I am Running .5X10

And I Want to run LFSLapper (Drifting) which one should I use. Please please and please write the link if you know it .



Thanks again for all your efforts
You guys make it more enjoyable
Hi Gai,

1) Is it possible for me to create list of Drivers like !top but showing there Points instead.

2) Where are the SetStoredValues saved? are they stored in same file as driver PB times etc and how can I view the file, what software will open it in a readable format

3) Can we have a new Event so when a player leaves a race they can only re-join X amount of times less they get spectated and eventually kicked for multiple rejoins similar to what Tim has asked for.

4) The !ban feature needs an update, can we allow the !ban to ban on all servers now 1 instance of Lapper connects to all servers. So basically I type !ban Username 365 and the username gets banned for 365 days on ALL my servers. Lapper takes the command and passes it to every server connected.

5) The Voting System doesn't work at all.

6) Idle Spectate doesn't work in Qualy Mode anymore.

7) Posabs works sometimes but doesn't most of the time.

8) !stats doesn't work anymore.

9) Feature request !msa and !rca like Airio where !msa sends a message to all servers connected to Lapper and !rca sends Race Control message to all servers. Both useful in lots of circumstances especially to warn drivers of Event start times when using multiple servers.

10) Can we dictate per server when server commands are shown like ShowCommands = True/False

Thats it for now. Thanks Gai.
Hi,
I found a handy tool to open your Database.
SQLite Database Browser is a freeware, public domain, open source visual tool used to create, design and edit database files compatible with SQLite.
You can find it here. http://sqlitebrowser.sourceforge.net/
This thread is closed

LFSLapper insim4 Release
(2101 posts, closed, started )
FGED GREDG RDFGDR GSFDG