The online racing simulator
[CODE] Snow Mod
Just for bit of fun, made a mod that shows 'snow' on screen - goes with trackah123's snow track mod. This mod can be found HERE.

To see it in operation, I've posted it on YouTube (here). Wish I'd thought to redo my skin by painting snow on it - I wasted artistic opportunity there!

Works best for open cockpit cars (obviously! else would like snow inside vehicles in some views).

To use, unzip snow.zip file, and add snow.lpr file into your \includes directory.

Then open your \addonused.lpr file and add the line include( "./snow.lpr");

Snow set OFF as default. To make it work, type !snow.

Alternatively, if you want it on as default, open the snow.lpr file, and change
$snow_state = "off";
to
$snow_state = "on";

This part of the code is on line 19.

NOTE If opening file, then make sure the program you use (e.g. PSPad, Notepad, etc) is set to open and save in UTF-8 format, else instead of round snow drops you'll get question marks (?) all over your screen!

Code will work on AS1, BL1, FE1, SO1 and WE1 tracks.

French and Dutch translations courtesy of Google Translator
Attached images
snow1.png
snow2.png
snow3.png
Attached files
snow.zip - 6 KB - 1607 views
Rain Mod Alternative (using snow.lpr file)
If you'd rather have a Rain mod rather than a Snow mod, is would be easy enough to change snow.lpr file.

Rename snow.lpr to rain.lpr.

Open addonused.lpr file and change include( "./snow.lpr to include( "./rain.lpr.

Remembering issues with ASCII and UTF-8 code, open the recently renamed rain.lpr file and using Search and Replace function, search for the word snow and replace with rain.

While you have it open, look in the language section (at bottom of code) and remove the ^7 code from in front of the spots. Then save.

Removing the ^7 code will change the white spots to gray spots.

To start the code when lapper's already running, you will then need to use !rain as the trigger word.
HI THERE GUYS
GUYS I,M FAN OF LFS X10 I HAVE EDIT IN MY OWN WAY ON LFSLAPPER IT WAS HARD BUT TILL NOW I STILL DUN GET IT WHEN SOME STUFF DONT WORK ON MY LFS X SERVER
I TRYED OUT THIS SNOW MOD IT WORKS FINE UNTIL I PRESS YES THEN IT TELLS ME
( If not currently showing, the snow will appear on next scheduled occurance ) THEN NOTHING HAPPEN NO SNOW
BUT IF I OPEN MY SERVER LFS Z31 OR B IT WORKS PERFECT BUT UNFORTUNATELY
I WANT THIS MOD TO WORK ON LFS X VERSION COZ I LOVE THIS VERSION SO PLZ CAN U HELP ME?
Insim changed between LFS X and Z. It's doubtful that you will find anyone backporting Lapper. You could try installing an old version of Lapper, but I make no guarantees.
BY THE WAY dawesdust_12 THANX FOR UR ANSWER BUT OFCOURSE AND I,M SURE THERE IS A WAY TO SOLVE THIS PROBLEM IT SHOULD BE A WAY
MAYBE OUR BEST LFSLAPEER I.T MR.sinanju HE CAN HELP ME OUT
WITH THIS SNOW MOD SHOULD WORK ITS FINE WITH OUT THE USERNAME SHOWING UP ITS FINE WITH ME AS LONG AS A I HAVE SNOW SHOWING UP AND HAVE BUTTONS SHOWING UP TO SHUT IT ON AND OFF
@OSAMA-AK47: Please do us a favor and turnoff your capslock. Writing in only capitals is online seen as screaming and there certainly isn't a need to scream here. Thank you.
I'm glad you like the mod, and even happier that it works for you on newer versions of LFS.

However, I have absolutely no idea why it wouldn't work on earlier versions, but there must be something in the underlying LFSLapper code that doesn't connect with earlier version of LFS.

'dawesdust_12s says there was a change in the Insim between the different LFS versions - I wouldn't have a clue about that, what these changes were, and how they changed things.

I'm not a programmer - I can use lapper to open and close buttons, which are what the 'snow flakes' are. There's even a limitation in that you are only able to have a finite number of buttons open at one time (200?), so if you have any other lapper things open (like Yisc's Pitboard for instance), then bits of these other things can start disappearing.

I only did the coding at the time as I had been unemployed for a while, and was bored. Now I'm working, and other things are also happening in my life (some positive, some really not), I don't have the time or commitment to do anything else just now.

Even if I did, couldn't, as wouldn't know where to start.
Btw Yisc[NL] thanx for telling me that and ur welcome but i didnt know evin the words can scream as u know object never scream and talk only human being can talk lol...

and as 4 u mr.sinanju u r the best and thanx for ur respond and now i got the whole idea about the lapper or maybe kind of ...
but really thank u very much sinanju thanx alot and alot

( I know i,m not welcomed here but i will stay coz i love lfs and aowsome people )

thanx guys
how can i get this to work on WE1X?
If you open the script, see will see alot of RegisterNodeAction() lines.
one of the is RegisterNodeAction( "FE1" , 24 , SE_snow4,"" );

This is for FernBay 01 and it will executes on a particular node on the track. Type !node to see your current node.

However. What you want is getting snow on a Open-Config track. Since Open-Configs doesnt work with nodes but with X and Y Axis(Called Zones in Lapper). That means you have to work with a another function is Lapper: RegisterZoneAction();

Example:

#RegisterZoneAction("Track" , X , Y , Width of Zone, EnterZone, LeaveZone);
RegisterZoneAction( "WE1X" , 24 , 30 , 1 , SE_snow4,"" );

Type !zone to get your current X and Y position.

More info about Nodes and Zone in the link below.

https://www.lfs.net/forum/thread/89860-Nodes-and-Zones

FGED GREDG RDFGDR GSFDG