The online racing simulator
Searching in All forums
(38 results)
2
skorzz
S3 licensed
Quote from Yisc[NL :;2065937"]I am picking my brain as I think I had a similar issue with one of my scripts in the past.
Worked fine with a few players, but went wrong when the amount of players got above a certain point.
Need to dig around in my scripts, to see what script it was and how I fixed or debugged it.

Did you find anything?
Using symbols in buttons
skorzz
S3 licensed
How do I use symbols like ↑↓→← in buttons, already shared on the forum https://www.lfs.net/forum/thread/89157-Buttons---Learn-how-to-use-them---Advanced-%28Symbols-Glyphs%29 When I try to run the codes in the link, the symbols do not appear on the buttons. My lapper version is 7.0.8.0.
skorzz
S3 licensed
Quote from Yisc[NL :;2065937"]I am picking my brain as I think I had a similar issue with one of my scripts in the past.
Worked fine with a few players, but went wrong when the amount of players got above a certain point.
Need to dig around in my scripts, to see what script it was and how I fixed or debugged it.

It would be nice if you find something, thank you for your effort.
skorzz
S3 licensed
Quote from RSAbeaats :So i need to make a new file in the LFS files or add it to a existing file??

This is a speedometer script for lfslapper, it can't be used on original lfs.
skorzz
S3 licensed
Quote from RSAbeaats :This is super cool but where does this coding go??

Create your file according to the file location below
\default\includes\speedometer.lpr

and add the following code into the addonused.lpr file (\default\includes\addonused.lpr)
include( "./speedometer.lpr");

You now have a speedometer
error in ondriftscore code
skorzz
S3 licensed
Hi! There is no problem when I am the only player on the server, the drift counter works, but when there are more than 6 members on the server, the drift counter does not work for some player. I also want to know the difference between catchevent and normal event.



<?php 
$DriftDatabase 
"Databases/DriftPB";
$RealTimeDriftScore 1#Turn on (1) /off (-1) realtime driftscoring . This may have effect on LFSLapper performance with many players on the server. (Default = -1)
$MinimumDriftSpeed 10# Minimum speed in km/h to maintain. Driving below that speed will reset score
$MinimumDriftAngle 15# Minimum angel to maintain. When angle is below value, score is resetx
$MaximumDriftAngle 100# Maximum angel to maintain. When angle is above value, score is reset

CatchEvent OnDriftScore$userName # Player event
    
openPrivButton"drfhud_DriftText",80,36,40,20,4,10,0,"^1DRIFT");
    
openPrivButton"drfhud_TotalScore",80,48,40,20,4,10,0,"^7"ToNum(GetCurrentPlayerVar("DriftScore")));
    
SetCurrentPlayerVar("DriftSC"ToNum(GetCurrentPlayerVar("DriftScore")));
EndCatchEvent

CatchEvent OnDriftResetScore
$userName # Player event
    
openPrivButton"drfhud_GetMoney",80,61,40,10,4,10,0,"^2+ Drift End");
    
privdelayedcommand(2closedrifthud);
EndCatchEvent

Sub closedrifthud
($KeyFlags)
    
closeprivbutton("drfhud_GetMoney&drfhud_TotalScore&drfhud_DriftText");
EndSub

?>


skorzz
S3 licensed
Quote from Androphp :The efficiency of your computer will vary depending on the RAM capacity you use. In order to use .NET 4.8.1, you need to have the Windows 10 version. I recommended this because it is hosted in Windows Server 2019. If you cannot get efficiency in the 2022 version, you can switch to the 2019 version.

Thank you andro!
skorzz
S3 licensed
Quote from Androphp :Hello, unfortunately, .NET 4.8.1 is required to use that version of Lapper. Try using Windows Server 2019 for this.

Thank you for your answer andro! I have currently installed Windows Server 2022 and it is working, but will the system become faster if I use Windows Server 2019?
.Net 4.8.1 Problem in Windows server 2012
skorzz
S3 licensed
Is .net 4.8.1 required for lapper 7.0.9.3? Windows server 2012 does not support .net 4.8.1. I can't run lapper.
Language Select
skorzz
S3 licensed
You can use this script to use multiple languages ​​on your server!

Languages ​​available in the menu;

Turkish
English
Portuguese
Italian
French
German


I have stated below what you need to do to use more than one language in a different script;

First Step
Paste the code I gave below at the bottom of your script, you need to paste the same code for each language.

<?php 
Lang 
"EN"
    
exampletranslate "Lorem Ipsum";
EndLang
?>


Second Step
For example, you want to use this message in a chat message, use the code I gave below in privMsg();

<?php 
privMsg
langEngine("%{exampletranslate}%") );
?>

Final Step
Enjoy It!
skorzz
S3 licensed
If you change the 1 in the privDelayedCommand( 1, speed ) code to 0, the speed will be refreshed faster.
skorzz
S3 licensed
Quote from fastranker1 :cool! ty

is it possible to make it red after a certain speed? (etc 160 km/h)

Of course, here I prepared it for you;


<?php 
CatchEvent OnConnect
$userName )
    
privDelayedCommand1speed);
EndCatchEvent

Sub speed
($KeyFlags)
    IF ( 
GetCurrentPlayerVar"InstantSpeed" ) < )
    
THEN
    openPrivButton
"speed",50,194,20,6,4,-1,37,"^30 ^7Km/h","");
    ELSE
    IF ( 
GetCurrentPlayerVar"InstantSpeed" ) > 160 )
    
THEN 
    openPrivButton
"speed",50,194,20,6,4,-1,37,"^1"Round(GetCurrentPlayerVar("InstantSpeed"),0). " ^7Km/h","");
    ELSE
    
openPrivButton"speed",50,194,20,6,4,-1,37,"^2"Round(GetCurrentPlayerVar("InstantSpeed"),0). " ^7Km/h","");
    ENDIF
    ENDIF
    
privDelayedCommand1speed );
EndSub
?>


Digital Speedometer
skorzz
S3 licensed
Quick and easy digital speedometer script, If your speed is 0, the text appears red.


<?php 
CatchEvent OnConnect
$userName )
    
privDelayedCommand1speed);
EndCatchEvent

Sub speed
($KeyFlags)
    IF ( 
GetCurrentPlayerVar"InstantSpeed" ) < )
    
THEN
    openPrivButton
"speed",50,194,20,6,4,-1,37,"^10 ^7Km/h","");
    ELSE
    
openPrivButton"speed",50,194,20,6,4,-1,37,"^2"Round(GetCurrentPlayerVar("InstantSpeed"),0). " ^7Km/h","");
    ENDIF
    
privDelayedCommand1speed );
EndSub
?>


2
FGED GREDG RDFGDR GSFDG