The online racing simulator
Searching in All forums
(968 results)
A Quicker Route Round
sinanju
S3 licensed
A Quicker Route Round



Slight changes resulting in saving approx fifth of a mile / 335 metres.

And this layout does includes a horse and cart!
sinanju
S3 licensed
The host name is Sin'rs (WE2Y A Route Round)
Windows 10
sinanju
S3 licensed
I got a "Get Windows 10" notification pop up on my task bar, offering me chance to upgrade from my existing Win 7 Pro to Win 10 Pro.

Anyone tried the demo version, and is it worth upgrading? Or, is anyone going to upgrade anyway?

Can't say I'm really a fan of the tile look introduced in Win 8, although my son has Win 8.1 on his laptop, and says you get used to it quite quickly. "Used to" isn't the same as liking.

As long as I can still access my music, photos, internet, email and LFS, don't really care much about what else it can do.

I'm aware Win7 mainstream support has already ended, although there is extended support till 2020.
sinanju
S3 licensed
Maybe Mygale, the people who made the car (here) might be willing to give you some details if you contact them?
sinanju
S3 licensed
Sadly, no, as I run out of objects. But the overturned car in Sector 1 still hasn't been removed, and there is a traffic island in sector 3.

Watching the other cars, most go past on the 'wrong' (right hand) side of the island - must be a continental thing, as in Britain, we're conditioned to go the left hand (right way) side.

I was going to tear down a grandstand to free some objects up, but it would mean resetting the server to reload the revised layout, and with almost a dozen times on the front screen, a couple of them quite quick, this would result in these being lost (although only from front screen).
Westhill WE2Y: A Route Round & A Quicker Route Round
sinanju
S3 licensed
Put new layout on one of my servers - "A Route Round".



Start to Finish is approx 6.67 miles / 10.7 km long, with each sector approx. 1/4 distance.

I've used sufficient 75m distance and corner arrow marker boards that means you should find your way round, and have some idea of where to brake.

Took me 6:22 minutes to get round in a RB4.

Note: If trying to set time on my server, it will only save times under 5:00 minutes.

As per my previous Westhill road layouts, you are expected to stay on the road - lots of route markers used, so if you miss one (go off road), you will be spec'd soon after.

Some cutting of corners allowed - within reason. But you must go through the 'gates', marked out with green posts.

Hitting a 'gate' will result in a time penalty - rather than a sudden stop like my other recent online layouts.



Edit: Added another layout (A Quicker Route Round)
Last edited by sinanju, .
sinanju
S3 licensed
Quote from Bass-Driver :ey,
just as we spoke via PM. Try my lapper.
If the yellowflag is working then must be something wrong with your Lapper/Script.
I will test yours tomorrow.

Still couldn't get it to work. Also tried your script and mine on my son's pc, and still same issues, including $Currply ["userName"]/$Currply ["nickName"] not working.

Put the yellowflag.lpr file - in attached zip - on my Sin'rs Too Drive It... server, and got the following;



Again, $Currply ["userName"]/$Currply ["nickName"] not working.

And it looks like the $Whois in the FOREACH gives a result as "Array" However, Array and my username don't appear when I try on my pc; only online. Also, on my pc, the !who command gives a blank page in Krayy's CIF module, but online, my name appears.

Also put on the new lfslapper.exe (one for getting live drift scores), which shows as V6.0.1.4 when typing !ver.
sinanju
S3 licensed
Another bit of testing - last tonight...



Assuming the code is correct, then $CurrPly["userName"] and $CurrPly["nickName"] just won't work (and I'm testing in 6.0.1.4).
sinanju
S3 licensed
Not got round to putting test yellow flag script onto my server yet, but I tested Port Forwarding on my pc earlier....



... and even closed my Windows Firewall, but still nothing.

Why that should make a difference when i'm testing as Local Multiplayer on home network 127.0.0.1:29999, I've no idea.

Tried a short test with new additional bit of code

Event OnConnect( $userName ) # Player event
$CurrPly = GetPlayerInfo( $userName );
$CurrPly["test"] = "(Debug) test";
WriteLine( $CurrPly["userName"] );
WriteLine( $CurrPly["nickName"] );
WriteLine( $CurrPly["test"] );
privMsg($CurrPly["userName"]);
privMsg($CurrPly["nickName"]);
privMsg($CurrPly["test"]);
EndEvent

In the lapper console, I get "(Debug) test", and in game, I also get "(Debug) test" - but neither show my username or nickname, which is weird. My first thought was maybe V6.0.1.3 didn't recognise $CurrPly, but if so, why do I get both debug messages, which rely on $CurrPly?

And no other script that requires use of FOREACH is working.

Just had a thought - if I have time later, I'll test on my son's pc (probably require to install LFS, but I can always try it in demo mode. Probably should have done this first Shrug

Big thank you for sticking with me!
sinanju
S3 licensed
Further tests done - all to no avail.

Downloaded and re-installed LFS, then ran lapper with yellowflag5.lpr add-on, but still no yellow flag, although country flag ok.

Added some additional code;

------------------------------------------------------------------------------------------------------
CatchEvent OnSplit1( $userName ) # Player event
SetCurrentPlayerVar("IsInSplitSector",2 );
privMsg("(DEBUG) ^7You are now in Sector: ^2".getCurrentPlayerVar("IsInSplitSector"));
$CurrPly = GetPlayerInfo( $userName );
WriteLine( $CurrPly["userName"] );
WriteLine( $CurrPly["nickName"] );
WriteLine( $CurrPly["IsInSplitSector"] );
privMsg ( $CurrPly["userName"] );
privMsg ( $CurrPly["nickName"] );
privMsg ( $CurrPly["IsInSplitSector"] );
EndCatchEvent

------------------------------------------------------------------------------------------------------

(ditto for other splits) and

------------------------------------------------------------------------------------------------------
CatchEvent OnAngleVelocity( $userName ) # Player event

######CRASH IN SECTOR 1 ( STARTLINE - 1ST SPLIT)#########
$CurrPly = GetPlayerInfo( $userName );

IF(GetCurrentPlayerVar("IsInSplitSector") == 1)THEN

### First part is test to make sure a flag and message appears for person who crashed ###
openprivButton("flaga",75,9,40,90,8,3,64,"^1-%nl%^7-%nl%^4-");
openprivButton("flagb",85,9,40,90,8,3,64,"^1-%nl%^7-%nl%^4-");
privMsg ( "(DEBUG_TEST) ^3YELLOW FLAG IN SECTOR: ^61");

privMsg ( $CurrPly["userName"] );
privMsg ( $CurrPly["nickName"] );
privMsg ( $CurrPly["IsInSplitSector"] );

### Second part polls round every player to see if they are in right sector, and if so, different flag and message will apppear ###
$ListOfPlayers = GetListOfPlayers("U");
FOREACH( $CurrUname IN $ListOfPlayers)

IF((GetPlayerVar( $CurrUname["value"], "IsInSplitSector" ) == 4)||(GetPlayerVar( $CurrUname["value"], "IsInSplitSector" ) == 1))THEN
writeLine( "Key = " . $CurrUname["key" ] . " Value = " . $CurrUname["value" ] );
dumpVar( $CurrUname );
GlobalMsg ( $CurrUname["value"] , "(DEBUG) ^3YELLOWFLAG SECTOR: ^61");
openprivButton( "flag1",152,56,40,90,8,3,64,"^3-%nl%^3-%nl%^3-%nl%^3-");
openprivButton( "flag2",162,56,40,90,8,3,64,"^3-%nl%^3-%nl%^3-%nl%^3-");
ENDIF

ENDFOREACH
ENDIF
EndCatchEvent

------------------------------------------------------------------------------------------------------

Although the Sector debug messages work ("(DEBUG) You are now in Sector n"), none of the FOREACH, WriteLine, dumpVar or the $CurrPly messages appear in console or on screen.

When I do a !who request, my name doesn't appear in Krayy's CIF module (don't think I've looked at this offline before, so not sure if that's normal). Nor does it appear in the Membership module, which I've never enabled before and only used in this test as it was included and set up in the new lapper V6 I installed.

For these reasons, I think the problem may be something to do with my Win7 or network settings, although lapper is allowed full access to my network, so not sure what network problem could be.


My next step (much later on today), will be to put a yellowflag.lpr file onto one of my online servers, and test it online. That way it doesn't rely on my Win7 or network settings being correct.
sinanju
S3 licensed
Still can't get it to work.

Tried again on vanilla copy of LFSLapper V6.014_v015. Added my yellowflag5.lpr file, and although the country flags and debug messages are seen on big drifts, the yellow flags and debug messages still missing.

Then used your modified .exe file, and apart from updating my drift scoreboard live (I only found out how to do this 2 weeks ago using lapper script!), still no yellow flag or debug messages.

Moved by LFS directory from C:\Games\ to C:\, even though I've never had any previous issues with LFS in my Win7 Games directory, but no difference.

Tried your file (which I called yellowflag6.exe), with and without modified .exe, and still not working.

The major change I made to your new file was to remove the IF($yellowflagsystem == "on" part - there will be no IF on my servers - it will always be on.

Everything I've been using, including modified .exe, in attached zip.

The only other thing I can think of to do is to download new copy of LFS and install that, then test again.
sinanju
S3 licensed
Just downloaded your new file.

Wonder if the problems I'm having are related to me using V6.0.1.3?

This is the version both of my online host providers add when user requests lapper (as against Airio), so its the version I use for testing offline (multiplayer/start new host/visibility: local), as I've been doing for this code.
sinanju
S3 licensed
Feeling stupid as still can't get your code to work.

Tried streamlining a bit - I'm testing on track with 4 sectors, so just set GlobalVar
GlobalVar $TrackSplits ; $TrackSplits = "3";

Added small country flag and private message to appear before the FOREACH sections to prove that going over $MinAngleVelocity = 25; works - it does, but the yellow flag and global message that should appear once the FOREACH code starts, still won't appear. And there are no errors being reported in the log files.

Code attached.

On your tracksplits code, you have $IsOpenConfig - I assume you must be using that in some other add-on, as not doing anything in the code you attached.
sinanju
S3 licensed
As we both thought, it was the OnMaxNbInStunt event causing the spec when spinning.

I've never changed the default since using lapper, and I've never added it into any other add-ons.

I disabled it, so I no longer got specced, but I still don't get debug messages on spinning.

I then re-enabled it, and transferred your code from 'CatchEvent OnAngleVelocity' to 'CatchEvent OnMaxNbInStunt', but, again, no debug messages.

Just a thought, but would it be best to have same code in both these events?

What's "stunt mode" anyway? Donuts?
sinanju
S3 licensed
You are trying to do too much at once.

Do it one stage at a time, so you understand what is happening, and, more importantly, make it easier to change or fix if it doesn't work right.

Quote from MemoPedra :.. is there a way to "replace" the main_accept on the message self destruct or at the clickmessage, because now it doesnt show when someone log in, for example: "Robert a new visitor has logged in!" it only shows when i click at the accept button, so i just want to replace it to this i think
openPrivButton( "clickmessage",40,136,120,6,10,18,ISB_LIGHT,langEngine("%{main_clickmessage}%"),OnConnectCloseKick );

..

In the default lfslapper.lpr script, when someone connects, they get a welcome message with 2 buttons under the message. If the [ACCEPT] button is clicked, this does nothing BUT close the message and the buttons. If the [DENY] button is clicked, then the message and buttons are closed, AND the user will be kicked.

Because the timer is set to -1, the message will always stay on screen for the person that has connected, until they click either button.

The ACCEPT and DENY buttons are only triggers for starting a sub-routine when clicked. You could easily change these - for instance, you could change the wording, add a pop-up message when someone clicks on a button, change what they do - instead of just kicking someone if they click the DENY button, you could add a ban ( cmdLFS( "/ban " . $Username . " 30" )Wink, or add a message to say "I forgive you", and change the sub-routine at end of button code from "OnConnectCloseKick" to "OnConnectClose" (so both ACCEPT and DENY buttons do same thing). Or, for fun, reduce timer (eg -1 to 4) on DENY button sub to give new user only few seconds to hit button before it disappears, leaving only the ACCEPT button. Or, if you really wanted some serious fun, use the DelayedCommand code, then you could have the DENY button move around the screen every second or so.

What the buttons read, and what they do, is up to how you code them.

Your "clickmessage" button, which you have set to clear (self destruct!) in 18 seconds - if this is used in the 'Event OnConnect' section, and because its a private button, only the person joining should see this. So, if I understand correctly, why are you getting an ACCEPT button if someone else joins?

Best you show your whole OnConnect section (from Event to EndEvent), along with the relevant part of the language section. I can tell a lot about your "clickmessage" button - except what, if anything, it actually reads.
sinanju
S3 licensed
Quote from Bass-Driver :hey,

I have made already the basics(no not done yet) to set the user in the right Sector and detect where the crash is....

Tried your code,and the debug messages for advising player which sector they are in works (removed erroneous ENDIF in your Race and Qualy Events), but if you spin, you don't get message, but more likely (especially if big spin) to be spectated.

To make sure it wasn't a problem with the IF statements when a player was in a particular sector, I simplified the spin code to check

CatchEvent OnAngleVelocity( $userName ) # Player event

######CRASH IN SECTOR 1 ( STARTLINE - 1ST SPLIT)#########
IF(GetCurrentPlayerVar("IsInSplitSector") == 1)THEN
privMsg ( "(DEBUG) ^3YELLOWFLAG SECTOR: ^61");
openprivButton( "flag1",152,56,40,90,8,8,64,"^3-%nl%^3-%nl%^3-%nl%^3-"); #yellow flag
openprivButton( "flag2",162,56,40,90,8,8,64,"^3-%nl%^3-%nl%^3-%nl%^3-");
ENDIF

######CRASH IN SECTOR 2 ( 1ST SPLIT - 2ND SPLIT)#########
IF(GetCurrentPlayerVar("IsInSplitSector") == 2)THEN
privMsg ( "(DEBUG) ^1REDFLAG SECTOR: ^62");
openprivButton( "flag1",152,56,40,90,8,8,64,"^1-%nl%^1-%nl%^1-%nl%^1-"); #red flag
openprivButton( "flag2",162,56,40,90,8,8,64,"^1-%nl%^1-%nl%^1-%nl%^1-");
ENDIF

etc, etc

EndCatchEvent

This worked, but again, spin specs you.

Also experimented with putting the FOREACH before the IF statements (with ENDFOREACH after last ENDIF) but nothing happens.

Just had a thought as I finish this - which I need to check - wonder if the stunt Event causing spec?
Yellow Flag System Request
sinanju
S3 licensed
I made a simple Yellow flag system for people who spin that shows a global yellow flag to everyone to be aware that someone spun (likely caused by crash). There's also a delayed command, which shows a Green flag once the Yellow flag disappears off screen.

I'm using the 'Event OnAngleVelocity'.

However, I'd like it to be shown to people only in the sector the event occurs, along with the sector before.

So, if spin happens in Sector 3, then Sectors 2 and 3 get message, but not 1 and 4, or if spin happens in Sector 1, then sectors 1 and 4 get message.

Not sure about what happens if track layout only has 3 sectors, if code written for 4 sectors.

Anyone like to take this on?

My code is attached, which is mainly how the large flags are made.

For testing purposes only, I've set the $MinAngleVelocity very low - 40 - normally I have it at 181.
sinanju
S3 licensed
OK, so ACR = Admin Command Report, and when an error message comes through, its not really an error message, but LFS's way of saying that an admin has typed in an admin command?

Few things.

I'm the admin on my server, but as I only rent the server, then really I'm only just the insim-admin? Even although I have privileges on the server to change things, like tracks, weather, cars, welcome message, etc.

In the cut-down sample racecontrol.lpr file, I've stripped out all the 'IF UserIsAdmin' code, so the only admin command that's left is the globalRcm request to display message.

So, to stop at least some of the messages, instead of using any RCM messages, I'm better just using buttons to simulate an RCM message.

Without doing more testing, is cmdLFS an admin command?

(As an aside, in your sample code, you have cmdLfs( "/end " ); Does this bit work, even though LFS isn't written in capitals?).

And glad you managed to find your own 'bug'.

Comment: Lapper seems to be going same way as Airio, and appears to be no longer supported. I think we were very fortunate that Krayy took over for a while, but further InSim changes may impact on existing code.
'Warning packet not catched' Error Messages
sinanju
S3 licensed
Having problems with lots of error messages appearing in my <ip><port>MSG log files.

Most read
Quote :5/23/2015 5:18:01 PM -> Warning packet not catched (ACR)

but sometimes the occasional
Quote :5/23/2015 6:10:11 PM -> Warning packet not catched (57)

I assume that "catched" actually means 'cached' (as in stored)?

I have no idea what the "ACR" and "57" refer to.

Doing some experiments on my code, I >think< this may have something to do with the functions I'm using in some of my subs.

For instance, I might have sub like

Sub DoSomething($KeyFlags,$id )
blah
EndSub

and the 'ACR' may refer to the '$KeyFlags,$id' part.

Tried using
Sub DoSomething()
Sub DoSomething( $userName )
Sub DoSomething( $KeyFlags )

These all give the following error message (in my ERR file - not MSG file);
Syntax error in cfg file: Number of function argument not matche at line #nn in function 'DoSomething' script aborted

Also tried
Sub DoSomething( $KeyFlags,$id )
Sub DoSomething( $id, $argv )
Sub DoSomething( $KeyFlags,$userName )
Sub DoSomething( $KeyFlags,$argv )
Sub DoSomething( $KeyFlags,$status )

but these all gave the following error message (in MSG file);
Warning packet not catched (ACR)

I usually get minimum 2 of these messages, but normally 3.

So. Are the errors to do with the functions specified in the Sub header line? Or is it something else, and if so, what?

Is it because i'm using a sub with option to call multiple subs, which may have option to call other sub(s)?

Or am I using the wrong function(s) in previous subs to the one that actually causes the error message?

For instance, in the attached file, I start with a CASE command to get things going, which in turn lead to various subs to show a Yellow flag, as in (much simplified);

CASE "!rc":
DoRCM();
BREAK;

Sub DoRCM()
openPrivButton( "rcm_menumanager",35,71,24,5,5,-1,32, langEngine( "%{rcm_menumanager}%"),DoMenu);
EndSub

Sub DoMenu( $KeyFlags,$id)
openPrivButton( "rcm_track",35,62,24,5,6,-1,32, langEngine( "%{rcm_track}%"),DoRCtrack );
EndSub

Sub DoRCtrack($KeyFlags,$id )
openPrivButton( "rcm_track_yellowflag",36,60,21,5,5,-1,16, langEngine( "%{rcm_yellowflag}%"),DoRCyellowflag );
EndSub

Sub DoRCyellowflag($KeyFlags,$id )
globalRcm( langEngine( "%{rcm_yellowflagmessage}%" ));
EndSub

In this instance, the errors only happen when I click the button to show the Yellow flag message - this is the last sub in the chain..



My actual code is attached - much cut down to only show the Yellow flag message - once you've clicked the correct buttons, in sequence.

Anyone tell me where I'm going wrong?

Thanks.
Top Times and Drift Scores as @ 21 May 2015
sinanju
S3 licensed
Just over 100 timed laps on the server, so top times per car type, top 18 fastest times overall and top drift scores are...

sinanju
S3 licensed
You can't change the 'tilt' of a normal wall, but you can change its height. A ramp wall is already tilted, but you can't change it's height (its always 0.75m high).

In edit mode, the 'height' of a ramp wall refers to how much of a tilt you will have - if you choose 0.5m then one end will be 0.5m higher at one side than the other - regardless of length of wall).

When you use a normal wall, it is not placed perpendicular to the ground - it is placed horizontally (flat), 'Z' metres above zero (where Z can be from zero to 60m). But the ground you are trying to place it on may be 2m at one end and 3m at another. That means placing a 1m high wall could result in touching ground at one end, but being 1m above ground ("floating") at other end, or if you lower the wall 1m, one end 1m high above ground and other end disappearing into ground.

So, if you want a taller wall than a ramp wall, as Eclipsed said, sometimes you have to place a normal wall, then place a ramp wall on top, tilted to match ground

Building on Westhill is hard - I made a simple oval (see HERE) that on the normal AU1 Autocross map would have taken a few hours, but on Westhill, took about 16. And it's not unusual to think you've placed something on the 'ground', to find it's actually 'floating' in the air. Especially if the ground is grass. I've found that building something in mid-air, then lowering everything together, is sometimes better. But you're restricted to a group of 30 items.

You can always download my oval, then play around with it in Edit mode, especially the Z height of walls, to see what I mean.
sinanju
S3 licensed
Just caught up with the last 3 races - the first thing I noticed, is that all the female drivers who started the season, are gone, and permanently replaced with men. No female drivers at all left in this formula.

Wonder how Susie Wolff would have fared?
sinanju
S3 licensed
In my 'welcome section', all my buttons now start with the prefix "welc_" with an identifier as suffix, as in 'welc_backing'.

This is so I can use the line
closeButtonRegex (GetCurrentPlayerVar("UserName"), "welc_*");

to close all the buttons without worrying about missing any, or closing the wrong one(s).

All buttons now changed from a time of -1 (never close unless a sub-routine closes them) to about 12 seconds or so, so that message will disappear off screen in not too much time without having to click any buttons. The timer is just to show when it will disappear - for anyone that even bothers to read what's on screen.

The timer uses the %cpt% function (look in the docs/changes.txt file).

The timer does nothing but show a countdown time. The buttons will disappear anyway.
sinanju
S3 licensed
This is Bob Smith's VHPA (Vehicle Handling and Performance Analyser), which can be found HERE.

What it does
Allows you to open any LFS setup, analyse the effects of various parameters on vehicle handling and performance and, through understanding of the information presented, help alter setups to achieve the results you wish with minimal trial and error testing.
sinanju
S3 licensed
Look in the lfslapper.lpr file for 'main_welc1'. The first instance will be the code for the button, eg

openPrivButton( "welc",25,50,150,12,15,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );

and the second instance will be in the language section - Lang "EN" - and will read something like

main_welc1 = "^7Welcome {0} ^7to this ^1LFSLapper ^7powered server !%nl%^2Type ^7!help ^2after leaving garage to see commands.";

Change the code in the language section to read what you like.

Language section code breakdown:
^7 is for white coloured text
{0} is for the drivers nickname
^1 red coloured text
%nl% is for new line - anything after this goes on next line - remember to put coloured text identifier (eg ^2) after, otherwise text will be gray

Different sized text just means that I've used different buttons, as in main_welc1, main_welc2, main_welc3, etc, and placed them one under another.

I'm flattered that you want to use my welcome message, but if you want to use lapper, then I'm not going to just give you the code - the welcome message is one of the very easiest things that you can change (was the very first thing I ever learned to do), and if you can change that, and make it look and work like you want, then that's a big step.

If you need help in what all the details (especially the numbers) mean in the code for making a button, then look at this POST.

Play around with the 'lite' version I made - you can even change the English to Portugese wording in the Lang "EN" section (this is the default for lapper to look in if no other languages specified), so you might change welc1 to

main_welc1 = "^7Bem-vindo a este servidor {0}%nl%^2escreva !help a ver comandos";

(Assuming google translate does what I asked!).
FGED GREDG RDFGDR GSFDG