The online racing simulator
[Solved] Automatic Messages
Anyone wanna write a quick auto-message script using the LFSLapper 7.0.4.8 file editing/reading system?

Pretty simple, just read from a file, each line is a message. Messages in the files would have the color codes (eg: ^1).
Where should these messages be displayed?
Do you want to only read the text from a file, or do you want to feed the file from a GUI in Lapper as well?
Only from a text file, each line being a single message.

Maybe a gui option to set the time in between messages in seconds.

Just having them GlobalMsg would be great.
Okay, doesn't sound too hard to script.
Will work on it tomorrow.
Quote from Yisc[NL] :Okay, doesn't sound too hard to script.
Will work on it tomorrow.

You never fail to help the community Smile
This was a nice exercise to get to grips with one of the new Lapper features (being able to read TXT files).
I think this module has all that you asked for, but of course the final verdict is in your hands.

- Download both files and save them in your 'includes' folder of Lapper
- Rename 'announcement_messages.txt' to 'announcement_messages.lpr'
- Open file 'announcement_messages.lpr' and adjust the path to the TXT file, matching your actual locating of the TXT file *
- Open 'addonsused.lpr' and add the new lpr file to the includes

* The path can be found in Sub 'announce_message()'
In this line: $Folder = "D:\LFSLapper V7.0.4.8\bin\includes";

Attached images
Capture.PNG
Attached files
announcement_messages.txt - 7.4 KB - 228 views
announcements.txt - 76 B - 233 views
No time to test it right now, but assuming it works (and im sure it will), that is perfect!

Though, how would i go about setting the path if i use mono on linux? Would i just use a linux path (/path/to/dir/)?
I hardly have any knowledge about linux, so I guess you will have to try what you think it should be.
If the path isn't correct, you won't see the messages I put in the 'announcements.txt' file for testing.
is the folder do not exist. The player who use the readfile() function will receive an errormessage. But in this case the host receives this kind of message.
But indeed what Yisc[NL] siad. You wont see the messages.
This thread is closed

FGED GREDG RDFGDR GSFDG