The online racing simulator
[REQUEST] Scripts
(6 posts, closed, started )
[REQUEST] Scripts
Hello, I have a community request for some scripts which would be ...

1) if you could tell me how can i make for a button to show the number of people connected ...
2) if they can make a script that saves the distance traveled by each user and that the distance is displayed in a button, that every time the user connects it shows the distance that is covered in the server ...

I hope it will not be too much trouble and thanks in advance
Wouldn't be too hard to write such script.
I will write it and post it here later today.
Here's the script you asked for.
It counts the number of connected players and stores/retrieves the distance driven for each player.
The value is stored in the database every 30 seconds, but of course you could change that time.

Download the file, rename it to 'connect_dist.lpr' and place it in the 'includes' folder.
Then open file 'addonsused.lpr' and add the following line:

include( "./connect_dist.lpr");

Attached images
Attached files
connect_dist.txt - 3.4 KB - 120 views
Thank you very much, from this script you can learn a little bit how to use it to save the values, thank you very much!
Specifies 30 seconds saved here ,

IF ( GetCurrentPlayerVar"IsHost" ) != "")
"savedist_" GetCurrentPlayerVar"UserName" ),30Save_total_distance_driven );

Here, it saves to the database , I'm sorry if I gave the wrong information.

Sub Save_total_distance_driven
$userName )
$total_distance_driven GetCurrentPlayerVar"total_distance_driven" ) + GetCurrentPlayerVar"TotDistMeter" );
SetCurrentPlayerVar"total_distance_driven",$total_distance_driven );
SetUserStoredValue"total_distance_driven"$total_distance_driven );
Total_distance_driven$KeyFlags );

Yes, I have seen that now I can do my scripts that keep values thanks to Yisc Big grin
This thread is closed

[REQUEST] Scripts
(6 posts, closed, started )