The online racing simulator
Searching in All forums
(893 results)
Bass-Driver
S3 licensed
There is no Twindrift scorer script available yet.

With a littlebit of practise you can create your own TwinDrift scorer script.

Note: you can request lapperscripts here: https://www.lfs.net/forum/437-Requests
Release: LFSLapper V7.0.6.1
Bass-Driver
S3 licensed


Hello Lapperusers,

Today we released a new version of lapper.
This "small" Lapper version contains some changes and more.

See the changelog below what we have done.

Congratulations to LakynVonLegendaus for being a Section moderator

EDIT: PLEASE GRAB VERSION 7.0.6.2 TO AVOID THE REGISTERSCHEDULEDACTION BUG


+---------------------------------------------------------------+
|Changes from 7.0.6.0 to 7.0.6.1 |
+---------------------------------------------------------------+
=================================================
Changed:
=================================================
1: GetLapperVar("racetime"); More accurate racetime.
2: Privmsg(); Can now be used in non-playerevents.
3: EditFile(); can now delete lines.
Set '-1' as $NewText and set $LineToEdit which line you want to delete.
###EXAMPLECODE###
$Filename = "TestFile";
$Folder = "C:\Users\Blah\Desktop";
$NewText = -1;
$LineToEdit = 5;
$Extension = ".txt";
EditFile($Filename,$Folder,$NewText,$LineToEdit,$Extension);

=================================================
Fix:
=================================================
1: Couldnt clear the selected objects with SetLytSelection();
-Keep the function empty to clear the selection: SetLytSelection();

=================================================
Removed:
=================================================
1: 2 functions in Sourcecode for requesting: GetLapperVars.
-Requesting Lappervars is a littlebit faster (not really noticable) and using less CPU Usage

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
looking good , thanks.
Release: LFSLapper V7.0.6.0
Bass-Driver
S3 licensed


Hello Lapperusers.

We are proud to present to you a new version of LFSLapper: V7.0.6.0

Many thanks to LakynVonLegendaus for helping me with updating this addon.

See the changelog below for the changes/fixes and ofcourse the new stuff.

NOTE:If you want some "LapperScript" example codes about one of the changes below. Request it in this topic.

+---------------------------------------------------------------+
|Changes from 7.0.5.0 to 7.0.6.0 |
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New LapperFunction: CreateDirectory();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
CreateDirectory($Source,$Name);

2: New LapperFunction: DeleteDirectory();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
DeleteDirectory($Source,$Name);

3: New LapperFunction: DirectoryExist();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
IF (DirectoryExist($Source,$Name) == 1) THEN
privmsg("Directory Exist!");
ELSE
privmsg("Directory does not Exist!");
ENDIF

#New Math Functions:
4: New lapperfunction: Cos(); #Calculate Cos
5: New lapperfunction: Sin();
6: New lapperfunction: Tan();
#Examples:
$cos = Cos(66);
$sin = Sin(66);

$angle = 30;
$Pi = 3.14;
$Radians = $angle * ($Pi/180);
$tan = Tan($Radians);

privMsg("Cos: " . $cos);
privMsg("Sin: " . $sin);
privMsg("Tan: " . $tan);

7: New debugoptions in LFSLapper.LPR # Will be displayed in you lapper console.
-$DisplayGetPlayerVar = 0; #Display GetPlayerVars
-$DisplaySetPlayerVar = 0; #Display SetPlayerVars
-$DisplayLapperVar = 0; #Display LapperVars
-$DisplayLapperFunction = 0; #Display LapperFunctions

8: New LapperFunction: GetLytSelection(); # Request info about objects selected in layout editor - response is seen in OnObjectInfo event with $Action 5

9: New LapperFunction: SetLytSelection(); #Place objects to clipboard or select them.
CASE "!setsel":
# X:Y:Z:Flag:Index:Heading,X:Y:Z:Flag:Index:Heading,...
$obj_L = "-244.25:-1282.62:17:1:178:0,-244.25:-1282:16.75:229:178:0";
$obj_A = "-244.25:-1281.88:16.5:33:178:-180,-244.25:-1281.56:17:9:178:0,-244.25:-1281.25:16.5:33:178:0";
$obj_PP = "-244.25:-1280.12:16.5:1:178:0,-244.25:-1279.88:17:25:178:0,-244.25:-1280.69:17:25:178:0,-244.25:-1280.94:16.5:1:178:0";
$obj_E = "-244.25:-1279.19:16.75:1:178:0,-244.25:-1278.69:17:225:178:0,-244.25:-1278.62:16.5:225:178:0,-244.25:-1278.69:17.5:245:178:0";
$obj_R = "-244.25:-1278.44:16.5:1:178:0,-244.25:-1278.19:17:25:178:-180,-244.25:-1277.88:16.5:65:178:0";

$objects = $obj_L.",".$obj_A.",".$obj_PP.",".$obj_E.",".$obj_R;
$PMOFlag = 0; # PMOFlag 0 -> clipboard selection, PMOFlag 4 -> select placed objects
SetLytSelection($PMOFlag,$objects);
BREAK;
=================================================
Changed:
=================================================
1: GetListOfLayout(); will display all the layouts instead of only the layouts of the current track
2: Soundoption for globalmsg(); / privmsg();
NOTE: is compatible with older scripts.

0 = No Sound
1 = Message Sound
2 = SystemMessage Sound
3 = InvalidKey Sound
4 = ERROR Sound
5 = NUM Sound

-Possible options for globalmsg() :
globalmsg("BLAHBLAH");
globalmsg("BLAHBLAH",0);
-Possible options for privmsg() :
privmsg("BLAHBLAH");
privmsg("BLAHBLAH",0);
privmsg($userName,"BLAHBLAH");
privmsg($userName,"BLAHBLAH",0);

3: X and Y playervars now returns Floating values: -123.45 instead of rounded -123
4: JoinRequest(); allows now floating X and Y values. See the line above.
5: RegisterZoneAction() allows floating X and Y values.
6: Event OnObjectInfo() New way for displaying Object info. See Code Example in LFSLapper.LPR

Old: OnObjectInfo($userName,$NumO,$Action,$X,$Y,$Z,$Flags,$Type,$InDex,$Heading)
New: OnObjectInfo($userName,$NumO,$Action,$ObjectsInfo)

=================================================
Fixed:
=================================================
1: Lappercrash when a non existing folder is added in addonused.lpr Include().
2: Path of several script in addonsused.lpr were wrong.
3: PlayerVars couldnt be used in OnDisconnect Player event.
4: Japanese Charbug
5: HTTP(); A Host or other invalid player couldnt send a webrequest.
6: Connectioninfo(); Must to execute this function twice after reloading lapper to set the playervars ( language,IP)
7: Lappercrash when a $var is placed outside a sub or (Catch)event
8: NON-admins couldnt add/remove objects since the last LFS Version
9: Typo in hardcoded objectslist.
10: Event OnObjectInfo didnt displayed floating values.
11: AddObject()/RemoveObject() doesnt work when input values have 1 digit behind the comma. (XX,5 instead of XX,50)
12: GetLapperVar("RaceTime") could increase CPU usage when use it in a loop.
=================================================
Removed:
=================================================
1: AFK/IDLE Timer playervar ( randomly stopped working)

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Its a systemmessage from LFS and i think you cannot hide that message.
Bass-Driver
S3 licensed
could you add a screenshot of the message
Bass-Driver
S3 licensed
This server is on the official Master Server

Buy this game and enjoy.
https://www.lfs.net/shop

You will support the devs aswell.
Bass-Driver
S3 licensed
I guess you downloaded that script from this thread:
https://www.lfs.net/forum/post/1450538#post1450538

You have to download the other scripts aswell to make the Closebutton to work.
Also, what i think is that those scripts are really outdated.
Those scripts are updated, renamed and are enabled by default in Lapper.

See in addonsused.LPR in the 'includes' folder.

#------------------------------------------------------------------------------#
# CIF includes
# You can reorder these lines to change the tab order on the sub-menus
#------------------------------------------------------------------------------#
include ("./cif/cif.lpr"); # This MUST be first to define all of the CIF globals

# CIF Info Modules #################
include ("./cif/info_tops.lpr"); # Top output with interactive buttons, replaces tops.lpr, !top, !near, !qual, !nearqual
include ("./cif/info_who.lpr"); # Who, replaces the who,lpr module and !who command

# CIF Config Modules #################
include ("./cif/config_membership.lpr"); # Membership administration
include ("./cif/config_handicaps.lpr"); # Player Handicap Info

# CIF Help Modules #################
include ("./cif/help_general.lpr"); # General Help and !help command
include ("./cif/help_admin.lpr"); # Admin Help
include ("./cif/help_stats.lpr"); # Stats Help
include ("./cif/help_custom.lpr"); # Custom server Help

And i dont want a free server.
S2/S3 is really nice, try it out yourself by buying this game. You will support the developers with it.
Bass-Driver
S3 licensed
Thank you.

New changelog:

-New sectorcolor: Magenta (fastest splittime)

V1.13(21-07-2018)
Update: Sectorcolors: Magenta color when you beat the fastest stored sectortime
Update: Chatmessages who beated the fastest time.
Update: Systemmessages: Displays the "Time to beat + driver" at the startline
Update: Renamed 'Checkpoints' to 'Sectors'
Fix: Sectorcounter wasnt set properly at the start, Should be 1 instead of 0
Fix: Random Lapper reboots. (probably)

Bass-Driver
S3 licensed
Few updates and fixes:

V1.12(20-07-2018)
Add: SplitColors (Green/Red) to see if you are faster or slower than your stored time.
Update: YellowFlag System: Added blinking yellow buttons.
Update: Few TimeTable changes.
Fix: Checkpoint Counter didnt reset @ startline.
Fix: StartTime invalid during first run after rebooting the insim.
Fix: Admincommand: !cleartimes >> Typo in the code that caused errormessages.
Fix: False 'PB' report. Even when the laptime is higher than the stored time.
Fix: Get penalty when hitting an object after finishing a stage.

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Another few updates:

V1.11(16-07-2018)
Add: False Start system
Add: Yellow Flag / GreenFlag system.
Add: Display TimeDifference with the current and stored split/total times.
Add: Chatmessage when a player set theire first run on the current stage
Add: Chatmessage when a player set a new Personal Best on the current Stage/Car configuration
Update: System Messages: False Start.
Update: System Messages: Yellow/Green.
Fix: CarClasses: Restricted car not cleared after switching to a non-restricted car
Fix: CarClasses: Couldnt reset cars to default.

Bass-Driver
S3 licensed
Thank you.

In the meanwhile i have updated the system and fixed some bugs
Still have to fix the CarClasses feature.

See the changelog below for the rest of the updates and fixes.

V1.09 (14-07-2018)
Add: Delete Countdown clock admincommand (!delclock)
Update: Changed Lapper library to newest (PublicTest) version V7.0.5.1 PT_07
Fix: Button Conflict : Adminmenu and Virtual Co-Driver
Fix: RaceTimer still enabled after spectating.
Fix: HUD not cleared after spectating.

V1.10(15-07-2018)
Fix: Name highlighting in Timetable doesnt work with capital letters.
Fix: Paging UP in timetable didnt work with new LFSLapper version.
Update: Filter Buttons in TimeTable
Update: Set default TimeForNextDriver to 6 seconds.
Update: System Messages: StartTime Error.

Bass-Driver
S3 licensed
I know, i need to be patient, and yes i'm. But i'm wondering, why there's no update about the next (Test)Patch. Because the last testpatch was released 5 weeks ago. Since than, the communication has ended between the devs and the community.

Is Scawen trying to add the new shadow system into the next testpatch?
Or is he enjoying the "good" weather Big grin.

We will never know, until he tell something about the major update Tongue.

Keep up the good work, Devs Thumbs up
Looking forward to the new shadowsystem.
Bass-Driver
S3 licensed
Hi, Thanks for finding a solution for this kind of error.
Bass-Driver
S3 licensed
Could not load file or assembly 'System.Data.SQLite.dll'

you sure, your copied all the files?
Bass-Driver
S3 licensed
I rebooted lapper, and i rejoined the server. The timer is working.
Bass-Driver
S3 licensed
hmm i have seen this before. I will contact someone who might have a fix for this.
AFK/IDLE Timer
Bass-Driver
S3 licensed
Hello,

Created a script to calculate your AFK/Idle time.

#AFK timer resets after enter a message or when you start driving.
#Idle timer resets after you start driving.

ScriptInfo:

#==================================================================================#
#Scriptname: IdleAFKTimer.LPR
#Author: Bass-Driver
#Version: 1.2
#VersionDate: 09-06-2018
#
##Version 1.1:
# -Fixed: Timer didnt work when a new player joined the server.
# -Fixed: Added ToNum() to check time.
##Version 1.2:
# -Add: MaxAFKTime GlobalVar
# -Add: MaxIdleTime GlobalVar
# -Fixed: Driving while lapperreboot still activate the timers. ( added a speedcheck)
#==================================================================================#

Add your own code between the lines below:

IF((ToNum(GetPlayerVar( $Player["value"], "AFKTimer")) > $MaxAFKTime) || (ToNum(GetPlayerVar( $Player["value"], "IdleTimer")) > $MaxIdleTime)) THEN
#Do Something
ENDIF

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Bass-Driver
S3 licensed
Quote from iceman121 :
  • #1. Array issue where LFSLapper can not distinguish the difference between the value 1. (11, 12, 21,31, etc..)
  • #2. Array issue where the array will be reset (applies to integer values) if there's no ."" at the end of the set value.
  • #3. Idle and Afk timers are still not solved till this day.
  • #4. The function GlobalMsg(); is unoptimized and would not show the full list of messages that need to be displayed depending on the player count.
  • #5. Private and Host delayed commands can be started multiple times using the same id. This shouldn't happen and in some cases the delayed commands can be started hundreds, if not thousands of times per second depending on how configured the function is.
  • #6. Both functions SetUserStoredValue(); and GetUserStoredValue(); are obsolete in my opinion due to how awfully these both functions work in terms of performance, It is honestly awfully slow.
  • #7. There's really no way to display to the user if the command he wrote does not exist. I assume this is a string issue as me and Bass-Driver tried to tackle down this problem.
  • #8. Found a bug in LFSLapper? comment down below and I will update this list.

#1: Is a old LFSLapper array bug. I have tried to fix this before with no luck.
The workaround is to add a "0" van the value is lower than 10, so results 01,02,03,04 etc

#2: Old array bug aswell. Is already noted long long time ago. Same as #1.

#3: I implemented the Idle/Afk playervars to make scripting easier. Couple of lapperversions later someone reported that those playervars arent working correctly. So these vars are very well used( not ). After a another attempt to finetune those playervars. I decided to delete the whole AFK/Idle code. Except the existing OnIdle() subs. It is better to create your own AFK/Idle timer script, which is easily todo. Will upload a basic script soon.

#4:This is noted and as you know i'm working on a new methode to display the Globalmsg propely with many players in the server. And no it is not working with the '/msg' command.

#5:My small fix attempt went wrong. But if you create the same 'DelayedCommand ID' 10 times as second. Something goes wrong within your script.

#6:Dont know where this comes from. I have updated the database source in V7.0.4.10. but that makes no difference.

#7:I think you talking about the SWITCH ENDSWITCH DEFAULT statements. Uhm havent tested it properly.
Maybe a example whould help?

#8:OK
Bass-Driver
S3 licensed
-Be sure your LFS Install is higher than TestPatch R13.
-Be sure you installed the latest version of Debian/Linux/Mono or whatever.

Have you tried LFSLapper V7.0.5.0??

If you dont want to use the LFS TestPatches. Go back to LFSLapper V7.0.4.10.

If both options above doesnt work for you, i have no clue either Tongue.
Bass-Driver
S3 licensed
you cant use single quotes in functions , because every value will be returned in a string.

you could use single quotes, but you have too add those in the string itself. like the example below.


<?php 
privmsg
("Your Nickname: '".GetPlayerVar($userName,"NickName")."'!" );
?>

To use double quotes you have to use the '^t' to output a double quote.


<?php 
privmsg
("Your Nickname: ".GetPlayerVar($userName,"NickName")."^t qoute ^t qoute" );
?>

Bass-Driver
S3 licensed
i dont see the InSim Checkpoint either.
Both should be on index 252 & 253

Object[252] = "Insim Checkpoint";
Object[253] = "Insim Circle";
Object[254] = "Restricted area";
Object[255] = "Route Checker";
Bass-Driver
S3 licensed
Never tried this function before because i not experience with PHP/HTML etc, but i think its something like this.

Website:

<?php 
$allowed_list 
= array(

    
"TechEdison" => "yes",
    
"Bass-Driver" => "no"

    
);

    
$username $_GET["u"];

    if(
$allowed_list[$username] == "yes")
    {
        echo 
'1';
    }
    else
    {
        echo 
'0';
    }
?>

In Lapper:


<?php 
Event OnConnect
($userName)

    
$Allowed http("http://myurl.com/script.php?u=".$userName);

    IF(
$Allowed == 0)
    
THEN
        cmdLFS
("/kick ".$userName);
        
GlobalMsg("Kicked: ".$userName.". Reason: Not Alowed");
    ELSE
        
GlobalMsg("Welcome Back: ".$userName);
    ENDIF

EndEvent
?>


Bass-Driver
S3 licensed
With using the http(); function.

Gai-Luron wrote a small tutorial, how to use this function.

https://www.lfs.net/forum/post/1305880#post1305880
Bass-Driver
S3 licensed
It is possible to show the list of connected players.

-Display a list of player in the chatlog
-Display a list of button with the playernames.

The examplecode below will be executed when typing the !lop command. Event OnMSO ($userName, $text ) # Player event


<?php 
#Display list of players in the chatlog
CASE "!lop":
    
$LoP GetListOfPlayers("U");
    
privmsg("-----[List of connected players]-----");
    FOREACH (
$Player IN $LoP)
        
$PLYuserName $Player["value"];
        
privmsg(GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");                        
    ENDFOREACH
BREAK;

#Create a list of buttons with the playernames.
CASE "!lop":
    
$hgt 80;
    
$LoP getListOfPlayers("U");
    
privmsg("-----[List of buttons with connected players]-----");
    FOREACH(
$Player IN $LoP)
        
$PLYuserName $Player["value"];
        
openButton($userName,"Btn_".$PLYuserName,170,$hgt,30,4,1,-1,16+64,GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");
        
$hgt=$hgt+4;
    ENDFOREACH
BREAK;
?>

If it not possible to prevent displaying messages (chatlog) from players.
FGED GREDG RDFGDR GSFDG