The online racing simulator
Quote from Krayy :Try commenting out teh GlobalMsg in the event and reloading to see if you get the same issue as there may not be a matching message in the Russian language section

no problem
UPDATE: Bug found and squashed (thanks AudiTT for the find)
What was happening here is that the OnDisconnect event was being triggered prior to the players UCID being removed formt he connection list, so when the event message was being delivered via GlobalMsg, it was trying to send the message to an invalid connection as the player had already left the server. Changed the order in which it did those 2 things and now we're okay.

e.g changed

<?php 
            string
[] args = new string[2];
            
args[0] = currInfoPlayer.userName;
            
args[1] = lostConnection.Reason.ToString();
            
newCfg.executeFunction("OnDisConnect"nullargs);
            
listOfPlayers.removePlayer(newCfg,lostConnection.UCID);
?>

to

<?php 
            string
[] args = new string[2];
            
args[0] = currInfoPlayer.userName;
            
args[1] = lostConnection.Reason.ToString();
            
listOfPlayers.removePlayer(newCfg,lostConnection.UCID);
            
newCfg.executeFunction("OnDisConnect"nullargs);
?>

Zip file updated on post #1
Krayy love your work mate, keep it up hey

I have been sitting on these bugs for awhile but would be nice to get em fixed ... nothing major just a few typos.

Pit stop end doesn't show the Username of who stopped
File : defpitinfo.lpr
Existing code:
globalMsg( langEngine( "%{main_endpit}%",GetCurrentPlayerVar("Nick[COLOR=red]n[/COLOR]ame"),numToMSH(GetCurrentPlayerVar("PitTime") ) ) );

Fix :
globalMsg( langEngine( "%{main_endpit}%",GetCurrentPlayerVar("Nick[COLOR=red]N[/COLOR]ame"),numToMSH(GetCurrentPlayerVar("PitTime") ) ) );

Handicap doesn't show intake value when set, so its impossible to find out what its set to unless your admin/full i believe?
File : lprlapper.lpr
Existing code:
globalMsg( langEngine( "%{main_tolowhand2}%",GetCurrentPlayerVar( "H_Mass" ), GetCurrentPlayerVar("H_T[COLOR=red]R[/COLOR]es")) );

Fix :
globalMsg( langEngine( "%{main_tolowhand2}%",GetCurrentPlayerVar( "H_Mass" ), GetCurrentPlayerVar("H_T[COLOR=red]r[/COLOR]es")) );

Also been messing around with the radar.lpr haven't tested it with the new version will send it thru for a glance when i've tested it.
Hope this helps & keep up your good work. Happy to beta test/help out in any way i can.
How select a Russian language?
Quote from [Audi TT] :How select a Russian language?

At the moment, there's no Russian language translation for LFSLapper.

There's currently;

English (Lang "EN")
Dutch (Lang "NL")
French (Lang "FR")
Norwegian (Lang "NO")

However, with a bit of work, a Russian language choice could be made.

You can add your own language section at the bottom of any .lpr file (e.g. LFSLapper.lpr), with a new section starting

Lang "RU"

and ending

EndLang

In between, put your own translation.

For instance, anything in any of the lapper files that has

"%{text_in_here}%"

can be changed in the language sections (almost like a lookup table).

So something like "%{main_accept}%"

would have (in the language sections)

main_accept = "Accept"; (English)
main_accept = "Accepter"; (French)
main_accept = "Accepteren"; (Dutch)
main_accept = "Godta"; (Norwegian)

So you could then have

Lang "RU"
main_accept = "принимать";
main_deny = "отрицать";
EndLang


There was a forum discussion on language translations a long time ago....
http://www.lfsforum.net/showthread.php?t=64611

Notes;
Anything not translated will show in English.
Lines with just numbers and symbols (e.g. driftmeter_TDS31 = "^3++";) will not need translating

To pick your language when 'lapper' is running, I think (!?) you have to CTRL I (?).



Default script is missing an *.lpr extension: Warning ".\default\.\includes/./pit_reminder" doesn't exist!

I also cleaned up the default LFSLapper.lpr a little bit.
Had to rename it to LFSLapper.txt to be able to upload it here.
Attached files
LFSLapper.txt - 70 KB - 431 views
Quote from [Audi TT] :How select a Russian language?

If you use the !myconfig command, that will allow you to select a default language. Any messages that do not have a specific language translation will default to english.
-
([Audi TT]) DELETED by [Audi TT]
Hi Krayy nice work Just wondering what where the commands to do the races in mins? I forgot from when we spoke the other night

Thanks mate
Quote from tiptop114 :Hi Krayy nice work Just wondering what where the commands to do the races in mins? I forgot from when we spoke the other night

Thanks mate

"!mins 20" will run a race for 20 minutes and add 1 lap at the end
"!mins 20 5" will run a 20 minute race then add 5 laps at the end of that time
"!kms 100" will run a 100 kilometer race
"!kms 100 3" will run a 100 kilometer race and add 5 laps at the end
Here is the speedtrap i've been using... its still rough... and the faster/slower times don't seem to work in qualifying anyways here it is as promised.

Don't forget to add the line to addonsused.lpr and rename file back to .lpr

include ("./optional/radar_trap.lpr"); # SpeedTrap
Attached files
radar_trap.txt - 12.1 KB - 385 views
Quote from Krayy :
"!kms 100 3" will run a 100 kilometer race and add 5 laps at the end

A typo? Or am I missing something?
Quote from Krayy :If you use the !myconfig command, that will allow you to select a default language. Any messages that do not have a specific language translation will default to english.

How do default language to Russia in LFSLapper.lpr file?
Quote from Whiskey :A typo? Or am I missing something?

Typo...damn. Only the !mins command supports the extra parameter for the amount of extra laps. !kms is absolute as it uses the track length to determine the amount of laps to do to satisfy the required distance.
Quote from [Audi TT] :How do default language to Russia in LFSLapper.lpr file?

Unfortunately at the moment it isn't. I can put the option in if you'd like as it would be a very simple thing to do. Then of course you would need to write the Russian translations of the messages.
Quote from therbo :Here is the speedtrap i've been using... its still rough... and the faster/slower times don't seem to work in qualifying anyways here it is as promised.

Don't forget to add the line to addonsused.lpr and rename file back to .lpr

include ("./optional/radar_trap.lpr"); # SpeedTrap

I quite like this feature although I put it in optional as it isn't feature complete yet. A few suggested features would be to allow the speed traps to be set in game and stored in an .ini file for ease of transport to other servers.

Also seing what traps are there and removing them if needed, otherwise it might get very chatty.
Quote from Krayy :Unfortunately at the moment it isn't. I can put the option in if you'd like as it would be a very simple thing to do. Then of course you would need to write the Russian translations of the messages.

I this translations.

the true command?
SetCurrentPlayerVar( "IdLang","RU");

Quote from [Audi TT] :I this translations.

the true command?
SetCurrentPlayerVar( "IdLang","RU");


Yes. You could put that command in the OnConnect function to force the default language to Russian. This will override any configuration tha tteh user has done using the !myconfig command though, so only do that if you are certain it will only be people who speak Russian who log into the server.

Actually I can move all of the config options in !myconfig into a Lapper script and store it in the database, then you could do a "GetStoredValue("IdLang") and if its not set explicitly, then default to RU. I'll do that soon.
Thanks Krayy.. I can't seem to get the !mins or !kms to work however.
If i type !mins 15 to start a 15min race it doesn't seem to change anything in the server(no on screen messages either). only if i type !mins do i get a response stating that the server is back to laps.

Am i missing something?
Quote from therbo :Thanks Krayy.. I can't seem to get the !mins or !kms to work however.
If i type !mins 15 to start a 15min race it doesn't seem to change anything in the server(no on screen messages either). only if i type !mins do i get a response stating that the server is back to laps.

Am i missing something?

Are you logging in as an Administrator and if you type "!ma", if your username is not set as an admin use the + button to raise your permissions.
Yep i'm admin in the !ma screen and also in the txt files also using logging in with&without the admin password.
Even if i type !mins fsdafd (text not number) no error message appears as it looks as tho it should from the script
Quote from therbo :Yep i'm admin in the !ma screen and also in the txt files also using logging in with&without the admin password.
Even if i type !mins fsdafd (text not number) no error message appears as it looks as tho it should from the script

Well I found the problem...I had not included the code for the isNum function in the 6.014 binary. I have now rectified that so it will work if you download the updated zip file (v011)
Well done, tried and tested and working perfectly now!
Love your work Krayy!
New updates for v012...

Lapper crashed when the server pasword was wrong, so I have now change the default ini file to have a blank password and when lapper sees a lapper instance with a blank password it will show an error in the console. So when doing the initial install, run LFSLapper which will cerate the default directory, then you will need to close Lapper, edit the default_ini file with the server password and then restart.

Added the "NumberPlate" player var which is populated when a player joins a race or renames their Plate...use like this:


<?php 
        
CASE "!pl":
                
privMsg "^7Plate: " GetCurrentPlayerVar"NumberPlate" ) );
            BREAK;
?>

thank you for implement my idea xd

FGED GREDG RDFGDR GSFDG