The online racing simulator
LFSLapper insim4 Release
(2101 posts, closed, started )
Quote from Yisc[NL] :You have to set it in the On connect section.
Something like this:


Event OnConnect()
privMsg("Welcome " . $Nickname . "^8 to " . $HostName );
privMsg("^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")" );
privMsg("^3you have a choice of cars to drive: " . $CurrRotateCar );
EndEvent

I've split the messages into 3 lines otherwise some text won't be visable at the end of the line. You forgot a . before $HostName
Other option is to make a nice button-screen (see attached image)
If you want to see such screen live, go to:

[R-R]-Public demo
Absolute-beginners.nl[demo]

Thanks for the info (and the syntax checking!), but not quite what I mean.

Your screen (what I will call Server Welcome Page) needs acceptance to get into the "game", which is fine, but I want the reminder once they get past this and into the game proper.

If you look at my Server Welcome Page (attached), players can only get into the game by pressing 'Accept'. Once they do that, they're taken into the game, and this is the point where I want the reminder or note.
Attached images
Server Welcome Page.PNG
I want to ask how to get this things works .When i enter the game and write /insim he start butt cant count my DRIFT points ?.I want to make him count my drift points
Quote from zlato900 :I want to ask how to get this things works .When i enter the game and write /insim he start butt cant count my DRIFT points ?.I want to make him count my drift points

Hi,
If you have a old version of lapper remove the # at the begin of the lines in the drifting section or download a new one from page 1 of this threat and

Quote from Yisc[NL] :You have to remove /* and *\ in the drift section.
/* = start exclusion
*/ = end exclusion

Quote from sinanju :Thanks for the info (and the syntax checking!), but not quite what I mean.

Your screen (what I will call Server Welcome Page) needs acceptance to get into the "game", which is fine, but I want the reminder once they get past this and into the game proper.

If you look at my Server Welcome Page (attached), players can only get into the game by pressing 'Accept'. Once they do that, they're taken into the game, and this is the point where I want the reminder or note.

Ah okay, that's easy to do
You have to define an action when they click on accept.
Something like this will do the trick:


Event OnConnect()
openPrivButton( "welc",25,50,150,15,12,-1,0,"^7Welcome " . $Nickname . " ^7to ^1LFSLapper ^7powered server !&^2Type ^7!help ^2after leaving garage to see commands." );
openPrivButton( "pos",25,80,150,10,8,-1,0,"^7Your actual friendly Position (all visitors) : ^7" . $Posabs
. "&^2Your actual League prequalify Position : " . $Posqual . " ^6Estimate Pool : " . $Groupqual
. "&Don't use swearwords on this server"
. "&respect other player"
. "&otherwise you can be banned "
);
openPrivButton( "clos",78,120,20,10,10,-1,32,"Accept",OnConnectClose );
openPrivButton( "ref",103,120,20,10,10,-1,32,"Deny",OnConnectCloseKick );
http("http://www.frh-team.net/reglapper/getserver2.php" );
EndEvent

Sub OnConnectClose()
closePrivButton("welc&pos&clos&ref");
privMsg("Welcome " . $Nickname . "^8 to " . $HostName );
privMsg("^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")" );
privMsg("^3you have a choice of cars to drive: " . $CurrRotateCar );
EndSub

I used the code provided in the sample config and added your messages in the Sub OnConnectClose section. Ofcourse you can also choose to set the text in a button like I do with my pitboard configurator.
Yisc[NL]

Many thanks for the quick reply.

It's so obvious when you point it out!
Next query!

I had a vague thought a while ago about naming the various streets and turns on the various tracks - don't know if LFS tracks have such a thing already.

Could buttons be set up for different tracks that when a car reached a certain distance (maybe use "$Dist" variable?), a button would pop up on the screen (top right corner, or something) giving the turn/street a name/number.

This button could be open for a predetermined length of time or might be better if when button #2 distance is reached, button #1 closes.

Not sure, but it may need 2 sets of instructions per button. One for driver, and other for spectator?

Realise this would be whole heap of work just for one track, never mind them all, but might make it interesting for spectators. Not sure if drivers would like buttons popping on and off all the time thought.
Quote from sinanju :Next query!

I had a vague thought a while ago about naming the various streets and turns on the various tracks - don't know if LFS tracks have such a thing already.

Could buttons be set up for different tracks that when a car reached a certain distance (maybe use "$Dist" variable?), a button would pop up on the screen (top right corner, or something) giving the turn/street a name/number.

This button could be open for a predetermined length of time or might be better if when button #2 distance is reached, button #1 closes.

Not sure, but it may need 2 sets of instructions per button. One for driver, and other for spectator?

Realise this would be whole heap of work just for one track, never mind them all, but might make it interesting for spectators. Not sure if drivers would like buttons popping on and off all the time thought.

I did a quick test and this isn't possible at the moment.
Distance is measered only after a full lap so you can't do anything with distance while driving a lap. Besides that, I think it's very annoying to see buttons popup all the time. Same goes for all sorts of messages in the middle of the screen or in the chatbox. Therefor I've chosen to make a lapper configuration which is as silent as possible and only displays information which is relevant for you.
Quote from sinanju :MPH as a speed identifier doesn't appear to work.

I have my player Options set to MPH, as well as acceleration options in lapper script, but I always get speed displayed as km/h.

Is this a bug?

#==================#
#Options for acceleration#
#==================#

#$AccelerationStartSpeed = 1; # At which speed to start measuring time. In km/h
#$AccelerationEndSpeed = 100; # At which speed to stop measuring time. In km/h

$AccelerationStartSpeedMph = 1; # At which speed to start measuring time. In Mph
$AccelerationEndSpeedMph = 60; # At which speed to stop measuring time. In Mph

$AccelerationPrivateMaxTime = 10; # Maximum acceleration time in seconds to show message
#Message to show to players.
Event OnAcceleration()
privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $AccelerationEndSpeedMph . " " . $UnitSpeed ."!" );
EndEvent

Simple workaround is:
Event OnAcceleration()
privMsg( "0 to 60 MPH in " . $AccelerationTime . " seconds " );
EndEvent



EDIT: NOT a bug! Silly me didn't realise you need to also set km/h or mph via the SHIFT I screen!
Quote from Yisc[NL] :Ah okay, that's easy to do
You have to define an action when they click on accept.
Something like this will do the trick: ......

....... I used the code provided in the sample config and added your messages in the Sub OnConnectClose section. Ofcourse you can also choose to set the text in a button like I do with my pitboard configurator.

Seems I might have been bit premature in my congratulations!

Made up a button, with the text inside, which pops up when the Accept button is clicked.

Unfortunately, the new text button stays in the Connect (Welcome) page.

I've taken screen dumps (pre button press, and after Accept button pressed).

Still looking for this 2nd button (or text message) to appear once (or few seconds after) the driver gets into the game proper.

(Hope that all makes sense).

Sinanju
(Sin'rs server)
Attached images
pre Accept Button press.PNG
after Accept Button press.PNG
Please show the code so I can see what you've done.
Quote from sinanju :Connect section attached.

I noticed the time set on that last button is very short but that isn't a real problem.
If you want people to go straight out on the track after hitting "Accept" just insert the ready command. Like this:


Sub OnConnectClose()
closePrivButton("welc&pos&clos&ref&serv&five&thanks");

cmdLFS( "/ready " );

openPrivButton( "noobs",5,83,40,4,4,1,32,"^3Welcome " . $Nickname . "^3 to " . $HostName
. "&^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")"
. "&^3you have a choice of cars to drive, including " . $CurrRotateCar );

IF( $Nickname == "unnamed" )
THEN
cmdLFS( "/kick " . $Username );
ENDIF

EndSub

Quote from Yisc[NL] :I noticed the time set on that last button is very short but that isn't a real problem.
If you want people to go straight out on the track after hitting "Accept" just insert the ready command. Like this:


Sub OnConnectClose()
closePrivButton("welc&pos&clos&ref&serv&five&thanks");

cmdLFS( "/ready " );

openPrivButton( "noobs",5,83,40,4,4,1,32,"^3Welcome " . $Nickname . "^3 to " . $HostName
. "&^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")"
. "&^3you have a choice of cars to drive, including " . $CurrRotateCar );

IF( $Nickname == "unnamed" )
THEN
cmdLFS( "/kick " . $Username );
ENDIF

EndSub


Hi

Followed your instructions (I was looking for a Gui-Luron command; didn't think about InSim command) but still doesn't work!

See my amended Connect section.

The 'Noobs' message still appears on the connect screen, and although I've set time very short, in actuality, it's variable.

Connected 10 separate times, and when I clicked the 'Accept' button, the 'Noobs' button stayed on screen average 18 seconds. Shortest period was 4 seconds (twice), and longest was 28 seconds (3 times).

Not sure if it makes a difference, but everytime I've connected, there has been no other drivers on the server (it's never busy!).
Attached files
amended LFSLapper On Connect.txt - 1.9 KB - 191 views
Quote from sinanju :Hi

Followed your instructions (I was looking for a Gai-Luron command; didn't think about InSim command) but still doesn't work!

See my amended Connect section.

The 'Noobs' message still appears on the connect screen, and although I've set time very short, in actuality, it's variable.

Connected 10 separate times, and when I clicked the 'Accept' button, the 'Noobs' button stayed on screen average 18 seconds. Shortest period was 4 seconds (twice), and longest was 28 seconds (3 times).

Not sure if it makes a difference, but everytime I've connected, there has been no other drivers on the server (it's never busy!).

Maybe we have a misunderstanding then. What do you mean with "appears on the connect screen". It should work as follows: People connect to the server, the welcome screen is shown together with the thank you button you've made (I thank you for that ) and after they hit accept, the Noobs message is shown for a defined period of time. As far as I can see (tested this with my own servers) this is working as described. If you want something else, I guess you have to ask the question in other words
Quote from Yisc[NL] :Maybe we have a misunderstanding then. What do you mean with "appears on the connect screen". It should work as follows: People connect to the server, the welcome screen is shown together with the thank you button you've made (I thank you for that ) and after they hit accept, the Noobs message is shown for a defined period of time. As far as I can see (tested this with my own servers) this is working as described. If you want something else, I guess you have to ask the question in other words

Hi

Sorry about my poor English; I'm Scottish!

I've loaded 2 pictures to show what I want (the small pop up 'Welcome' button) - might be better than explaining.
Attached images
Do NOT want.PNG
Do want.PNG
And you want that button to stay there?
Then you have to set the time to -1 and change the position of the button.
It's not possible to show the button when people leave the garage.
So there are two options:

1) show the button the same way it's now (maybe other position and/or time)
2) make it a button which is initiated on connect and stays there static
Quote from Yisc[NL] :And you want that button to stay there?
Then you have to set the time to -1 and change the position of the button.
It's not possible to show the button when people leave the garage.
So there are two options:

1) show the button the same way it's now (maybe other position and/or time)
2) make it a button which is initiated on connect and stays there static

Do I want button to stay there?
No

It doesn't really matter if it's a privMsg or a PrivButton (or something else); I only want some sort of message for a few seconds (in the game screen) to appear that reminds people what track they've joined.

Actually, what the button or message says is immaterial.

Would probably be better if it appeared top left hand side where normal messages appeared (I didn't want to put my message/button there while I was testing it in case some 'event' that LFS does automatically, overwrote the message before I could see if test worked.

I don't want it there permanently or for people to have to turn it on or turn it off (which is why I didn't use the '-1' time variable).

When I first originally started this message test, I tried scheduled action, but couldn't get that to work.

Then I thought about setting a variable under 'Event OnLapperStart()', but I couldn't get anything to work.

Sorry I can't explain better what I'm looking for.

Maybe such a thing can't be done via lapper, and I'm wasting your time!

PS I appreciate your patience dealing with an idiot like me!
Attached images
example.PNG
Quote from sinanju :Do I want button to stay there?
No

It doesn't really matter if it's a privMsg or a PrivButton (or something else); I only want some sort of message for a few seconds (in the game screen) to appear that reminds people what track they've joined.

Actually, what the button or message says is immaterial.

Would probably be better if it appeared top left hand side where normal messages appeared (I didn't want to put my message/button there while I was testing it in case some 'event' that LFS does automatically, overwrote the message before I could see if test worked.

I don't want it there permanently or for people to have to turn it on or turn it off (which is why I didn't use the '-1' time variable).

When I first originally started this message test, I tried scheduled action, but couldn't get that to work.

Then I thought about setting a variable under 'Event OnLapperStart()', but I couldn't get anything to work.

Sorry I can't explain better what I'm looking for.

Maybe such a thing can't be done via lapper, and I'm wasting your time!

PS I appreciate your patience dealing with an idiot like me!

No problem, I don't think your an idiot and I like to help people with this great program.
I think the biggest 'problem' is the difference between connect screen and game screen.
When a server is empty, you always stay in connect screen.
When some people are already driving, you go to spectate mode. (in which you see others driving)
You can only display such kind of button when someone connects to the server or you can choose to display a message/button on a regular basis with a scheduled action.
In a scheduled action you can't use private or global button so a text is the only option.
You could make it something like this:


Register ScheduleAction( "0 5 * * * *", Welcome );
Register ScheduleAction( "0 10 * * * *", Welcome );
Register ScheduleAction( "0 15 * * * *", Welcome );

Sub Welcome()
cmdLFS("/msg ^3Welcome " . $Nickname . "^3 to " . $HostName);
cmdLFS("/msg ^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")");
cmdLFS("/msg ^3you have a choice of cars to drive, including " . $CurrRotateCar );
EndSub

Quote from Yisc[NL] :No problem, I don't think your an idiot and I like to help people with this great program.
I think the biggest 'problem' is the difference between connect screen and game screen.
When a server is empty, you always stay in connect screen.
When some people are already driving, you go to spectate mode. (in which you see others driving)
You can only display such kind of button when someone connects to the server or you can choose to display a message/button on a regular basis with a scheduled action.
In a scheduled action you can't use private or global button so a text is the only option.
You could make it something like this:

It should be nice if we have a new player's variable something like $Spectateplayer.
Then can we make thing's like

IF( $Spectateplayer = true)
THEN
openPrivButton( "noobs",15,0,40,4,4,-1,32,"^3Welcome " . $Nickname . "^3 to " . $HostName
. "&^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")"
. "&^3you have a choice of cars to drive, including " . $CurrRotateCar );
ELSE
closePrivButton("noobs");
ENDIF

Or a new EVENT

Event Spectateplayer()
EndEvent
Thanks Yisc[NL] for advice (and patience) and Tim[NL] for suggestion.

Maybe the easiest way (for me) is to have a small button that always shows unless clicked off and says something like:

|----------------------------------|
| .....Press to find this sessions...... |
|Current Track / Current Car Choice |
|----------------------------------|
...............| OFF |
...............|-----|

and base that on $ShortTrackName and $CurrRotateCar.

Again, thanks.
Hi Gai, hi all...

I have a question about PBLFSLapperPHPViewer.

Prior, i'll try to explain the actual conditions:


I've 3 LFS Dedi servers running on the same machine, and 3 Lappers (one of each server), with synchro PB.txt files running good.

Now, my problem is to show these PB on a webpage, and here comes your PBLFSLapperPHPViewer.

Following the readme, it says to put "def.txt" in the folder where's pb.txt file. But, i've multiple pb.txt files in different folders, so, where i have to put it?

(to be clear, my idea is that, if pb's are synchronized, one should be equal to the other's, right?).

The website is hosted on aruba (if i remember well), so, from the remote server to aruba, i think i've to set the "FTP" section of lapper (now disabled).


So, how i can configure PBLFSLapperPHPViewer to work correctly?

Possible Workaround: I have a "small" website running on the same server as the game-servers are running, can i use it to show the webpage and maybe link the webpage to the main team-site (maybe in a nice box or a dedicated page or don't know..)


(i know, i'm a bit confused )


Thanks in advance for the help.
Quote from Cr45h :Hi Gai, hi all...

I have a question about PBLFSLapperPHPViewer.


So have I...what is it and where can I get it? I have searched the forum, yet the ONLY reference I can find is in this post?
Can you give me a link please?
hi,

i'am new to this lapper ting, and when i debug it, it says there is a wrong password somewhere. Which file is it in and whichl ine is to set it ?
Quote from sun :hi,

i'am new to this lapper ting, and when i debug it, it says there is a wrong password somewhere. Which file is it in and whichl ine is to set it ?

it'll be near the top, probs called pass=xxxx or something. Set it to blank, or to whatever the host admin pass is
Thx :d
This thread is closed

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