The online racing simulator
Searching in All forums
(970 results)
sinanju
S3 licensed
See HERE in the LFSLapper section.
sinanju
S3 licensed
I've included a BP (Brazilian Portugese) section in attached lfslapper.lpr file.

File had to be attached as .txt file - change the .txt to .lpr.

If you want to just use the BP part of the script and cut/copy and paste into your own copy of your lfslapper.lpr file, I've also included a text file that only has the BP language section in it.

No guarantee on how accurate the translation is as the Scottish version of English is only language I know!
closeButtonRegex bug
sinanju
S3 licensed
Found a strange bug with the closeButtonRegex command.

I have a bit of code that reads;

Quote :closeButtonRegex (GetCurrentPlayerVar("UserName"), "rd_*"); # close race director buttons

However, whenever I run that bit of code, the Pitboard (made by Yisc[NL]) closes.

Eventually, I found that when I changed all of the Pitboard code so that pitboard_ read pitb_ and then ran my code, all was fine.

Looks like the closeButtonRegex command is sort of putting an invisible wildcard in front of anything that is put in between the quotes so that if the letters left exactly match the end of any of your button names, then these button names will also be closed.

Nothing wrong with Yisc's code - just unfortunate that I used an abbreviation that exactly matched the end of his button names.
sinanju
S3 licensed
Old - 8 bit
sinanju
S3 licensed
If I had called it rain mod, you probably couldn't tell the difference.

In fact, I've put the code for this snow mod on the forum (in the LFSLapper section (HERE) with note on how to change it to a rain mod.

LFS (via InSIm) only allows choice of 9 colours so I could only make the dots white or grey.

Colour Codes:
^0 - black
^1 - red
^2 - green
^3 - yellow
^4 - blue
^5 - violet
^6 - cyan
^7 - white
^8 - no color (grey)

Actually, that's not quite true - I could have used any colour or combination of colours - but then I'd have to have called it Paintball mod! (Which I did number of years ago!).

LFS itself uses an orange button, so would be nice if you could get text that colour too - ^9? - that way I could make orange hi-vis vests for my marshalls.
Rain Mod Alternative (using snow.lpr file)
sinanju
S3 licensed
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.
[CODE] Snow Mod
sinanju
S3 licensed
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
sinanju
S3 licensed
Just used trakah123's (aka «Øs»ÐRäGK!NG») snow mod, and for a bit of fun, overlaid a snow mod I made myself with LFSLapper InSim to simulate snow drops - video on YouTube HERE.
sinanju
S3 licensed
Quote from david989898 :Ye nice but what .lpr am i opening and adding that cmds in ?

The racecontrol.lpr file, which you should have put in your /includes directory.

See attached .lpr file for example of how it should look (!rcm now changed to !secretsquirrel).
sinanju
S3 licensed
Quote from david989898 :Hello mate i am using your rcm and i love it !
But 1 problem even non admins on server are able to access the !rcm menu
How do i make it just for admins ?
Thanks for for answer/David

If you look in the code, you should see that only if a user is an admin, then the RCM console (window) will open.

Of course, being the only admin on my own server, I've never been able to test this!

However, if in fact anyone can open the console when they type !rcm (etc), then there's nothing to stop you changing the !rcm trigger word to another word, like !secretsquirrel, or !abracadabra, or !ta-da.

To do this, open the code, and search for !rcm.

Delete the following;

CASE "!rc": # Words/Text needed to start Race Control Menu
CASE "!RC":
CASE "!rcm":
CASE "!RCM":
CASE "!racecontrol":
CASE "!RACECONTROL":


If you wanted to use the word "secretsquirrel" then you would insert the following;

CASE "!secretsquirrel": # Words/Text needed to start Race Control Menu


Or if you wanted to use your own secret admin word, then it would be;

CASE "!<put secret admin word here>": # Words/Text needed to start Race Control Menu

Any trigger words you type (these are the words that start with a exclamation mark [!], like !help, !menu, etc) don't show up on anyone else's monitor so they can't see what is being typed. Therefore, they won't be able to see the trigger word.

However!!!!

As people (including admins) make mistakes (especially typos), there will be times when an admin will forget to type the exclamation mark in front of the secret trigger word. If this happens, then people will see the word that has been typed, and the more savvy people on your server may try the same word with an exclamation mark in front, thereby voiding your secret.

A half hearted way round this might be to have your secret trigger word, without the exclamation mark, actually do something different - this could be anything from spec'ing or kicking the typist, to making text appear as an answer.

For instance, say your secret admin word was !secretsquirrel, but someone typed in secretsquirrel, then if you had the following section included....

CASE "secretsquirrel":
privMsg("A squirrel that likes to hide its nuts" );
BREAK;


OR

CASE "secretsquirrel":
privMsg("Well done. You found the command to spec yourself!");
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
BREAK;


then the first bit of code would treat it as a joke, whereas the second would also treat it as a joke but also spec the typist.

Don't pick a word that people normally use (eg help), but don't use a word that people will query (eg secret_admin_command).

If you want to see an automatic reply to a trigger word in action, join my server (Sinrs Too), type the word quiz, then follow the instructions...!

sinanju
S3 licensed
Quote from david989898 :i open addonsused inte text document but where in spalt am i going to add the
include( "./racecontrol.lpr"); ?

Just add the line to the end of the lines already there - see attached screen dump of my listing...
sinanju
S3 licensed
To use, edit your /includes/addonused.lpr file by including
include( "./racecontrol.lpr");

Also, if you look in the default directory (where lfslapper.lpr is situated), you'll see a text file called admin.txt - make sure your LFS name is saved in this.
sinanju
S3 licensed
Quote from david989898 :i bring this up again anyone know only 1 insim that makes admin rights
like admin
1- can do everything ban kick change lay and more
2 only kick ban
3 only kick
anyone??

I wrote a Race Control Manager for LFSLapper (HERE) that would easily do most of what you want for your item 1. The track changing part already exists in an add-on included with 'lapper' (by TimNL) - see HERE.

I currently use V1.7 on my own server - you have to be an admin to open it.

Items 2 and 3 would mean re-write (adding permissions) if you only wanted certain admins to have restricted rights to do things - the code's public, so I don't mind if you want to have a go at editing it.
sinanju
S3 licensed
Within the lfslapper.lpr file, and in the swearword section there is the line

[B]#$SwearWordsList = "&./swear.txt[/B]";

If your code looks like that, then remove the hash symbol (#) from the start of the line.

In 'lapper' speak, the hash works like a comment mark and means everything from after the hash to the semi-colon at the end of the line(s) should be ignored.
sinanju
S3 licensed
In the main lfslapper.lpr file there's a section for swearwords (search Swearword filter) that advises that swearwords are saved in a .txt document called swear.txt.

This file is in same directory as the lfslapper.lpr file.

The default swear.txt file has few words in it - easy enough to add other words and save.

Copy of my swearword filter file attached - save you some typing.
sinanju
S3 licensed
Looks ok.
sinanju
S3 licensed
Before I posted, I deleted the 4 affected files and replaced them with files that I knew worked ok.
sinanju
S3 licensed
The LFS race server is working ok, but I had major problems with my LFSLapper server.

Following part may have relevance to anyone running LFSLapper InSim with their LFS game server if they find they have screen showing '...cannot be found' errors:

The following 4 files all had additional lines of code added in at the very end of the script (seemingly copied and pasted a random section from within the script);

lfslapper.lpr
pitboard.lpr
menu.lpr
racecontrol.lpr

When I run all the corrected code now (downloaded from the server) on my own home network, LFSLapper loads properly (without showing any errors), but the LFSLapper.exe file (in its own little cmd window) shows
'Error: Illegal character. at line #15422'

There is no file with this amount of lines, so I assume 'lapper' adds all the .lpr files together (lfslapper.lpr 5316 + accel.lpr 638 + addonused.lpr 87 +, etc) and all I have to do is hope I add up all the lines of code in the various .lpr files in the correct order and find the correct line 15422!
sinanju
S3 licensed
Krayy's removed his 6.014 versions from his post altogether now, but 6.012 should still work.

I assume that you've added the following line to the addonsused.lpr file?

include( "./racecontrol.lpr");

Hotlaps not being converted into RAF format
sinanju
S3 licensed
Over past few days I've uploaded about 7 or 8 hotlaps (same track, different cars) but when I try to compare any of them to other hotlaps, I get the message '....hotlap has not yet been converted into RAF format....'

Message says try giving it a minute - I've tried giving it a day, but still same message.
FGED GREDG RDFGDR GSFDG