The online racing simulator
Release: LFSLapper V7.0.5.0


Hello LapperUsers,

!!!YOU MUST DOWNLOAD LFS TESTPATCH R12 or HIGHER TO RUN THIS LAPPER VERSION!!!

See the changelog below what the new features are.

+---------------------------------+
|Changes from 7.0.4.10 to 7.0.5.0|
+---------------------------------+
-New Function
-New Events
-Several BugFixes
=================================================
New:
=================================================
=================================================
NEW EVENTS:
=================================================
01: New Event: Event OnTakeOverCar($Player_Old,$Player_New,$Car)
Event executes when someone takes over someone cars.

02: New Event: Event OnLapValidation( $userName,$HVLC,$Time )
Reports when a player hits a wall, goes off track, goes Out of Bounds, Speeds in the pitlane
#Output of $HVLC
# 0 : Off Track
# 1 : Hits Wall
# 4 : Speeding in pitlane
# 5 : Out of Bounds

03: New Event: OnInterfaceMode() VERSION LFS 0.6R12 required!!!!!
-Reports in which menu the Player is.
-Also report when a admin is editing an object in Shift+U mode

Event OnInterfaceMode($userName,$Mode,$SubMode,$SelObject,$Time) # Player event
#YourcodeHere
EndEvent
=================================================
NEW FUNCTIONS:
=================================================
01: New Function: GetAngle(); See attachment
-Get the angle of location or player , depends on your Cars Heading.

$Angle = GetAngle($userName,$userName);
$Angle = GetAngle($TheLocation,$userName);
$Angle = GetAngle($userName,$TheLocation);
$Angle = GetAngle($TheLocation,$TheLocation);
$Angle = GetAngle("-150:26","-150:26"); #(X:Y,x:y)

02: New Function: CarSwitches(); //More info in Docs/CarSwitches
-Set switches of your car lights,horn,siren,flash,signals
NOTE: You must be a host to enable this function.

03: New Lapperoption: DebugSettings , in LFSLapper.LPR
-When set one of the options below, it will displayed the executed subs/events/Loops in your Lapper console.
$DisplaySubs = 0; #Player created subs
$DisplayLoops = 0; #DelayedCommand functions,
$DisplayEvents = 0; #(Catch)Events

#Note: These settings are in a testfase, there is a chance that some subs not will be displayed in your console.

04: New Function: FileExist();
-Check if a file exist.
$Folder = "C:\Users\Danny\Desktop";
$FileName = "Testfile";
$Extension = ".txt";
IF (FileExist( $Folder,$FileName,$Extension ) == 1) THEN
privmsg("File Exist");
ELSE
privmsg("File does not Exist");
ENDIF

05: New Function: GetListOfFiles();

$Folder = "C:\Users\Danny\Desktop\CruiseFolder";

#Get an array of files from the folder
$ListOfFiles = getlistoffiles($Folder);

$NumberOfFileInFolder = 0; #This is the first file in the folder

#Values you can get from each file.
$FileNumber = $ListOfFiles[$NumberOfFileInFolder,"FileNumber"];
$FileName = $ListOfFiles[$NumberOfFileInFolder,"FileName"];
$CreationDate = $ListOfFiles[$NumberOfFileInFolder,"FileCreated"];
$ModifiedDate = $ListOfFiles[$NumberOfFileInFolder,"FileModified"];
$FileSize = $ListOfFiles[$NumberOfFileInFolder,"FileSize"];

06: New Lappervar: 'Lapperstate'
-Check which state your lapper is. Stable or experimental etc

=================================================
Updates:
=================================================
01: Lapper Console: Message/command length increased from 30 characters to 80 characters
02: Lapper Console: Message/command sendtime decreased from 1000 milliseconds to 100 milliseconds
03: Lapper Console: Server Connecting messages.
04: WriteLine(); Possible to use colortags ^0 - ^8 See attachment
05: Write(); Possible to use colortags ^0 - ^8
06: Sqlite Database libraryfiles. (not mono yet)
07: Event OnObjectInfo($userName,$NumO,$Action,$X,$Y,$Z,$Type,$InDex,$Heading) # Player event
//Added new value for $Action
//Get GroundLevel ZByte.
08: LFSLapper.LPR main scriptfile.
09: Update TrackList.cfg . Thanks Sinanju :)
10: Possible to not allow AI on track. THANKS LakynVonLegendaus
####################
#Disable AI drivers# (Can be found in LFSLapper.LPR below $DefaultTopCar option)
####################
# If enabled, LFS will not allow AI drivers to join race (/ai) and all AI drives that are
already on track will be spectated on Lapper start/reload
$DisableAI = -1; # Enable (1) or disable (-1)

11: Add/Removeobject: Floating values for X / Y / Z axis are now possible
12: Add/Removeobject: Non-floating input values will now be converted into floating values
13: Lapper no longer returns $userName converted to lowercase format
14: UserGroupToFile no longer converts usernames to lowercase format

=================================================
Fix:
=================================================
01: FO8 characterbug in SetAllowedCars();
02: F08 characterbug in AllowedPlayerCars();
03: Remove($String,$StartIndex,$NumberOfChars) : Error when StartIndex is lower than 1.
04: Addobject(): Lapper crash when X and Y values are floating (comma) numbers (0,00).
05: Addobject(): Lapper crash when Heading value is negative.
06: Removeobject(): Lapper crash when X and Y values are floating (comma) numbers (0,00).
07: Removeobject(): Lapper crash when Heading value is negative.
08: EditFile(): Lappercrash caused by a wrong hardcoded errormessage.
09: Lapper Console: Lapperserver 'stopped' message while starting a lapperserver.
10: Hosts also executed Flooding Events.
11: No error messages for StartLightControl.
12: joinrequest: Lapper crash when CarHeading is lower than 0.
13: (Priv/Host)Delayedcommand: Cannot be executed when settime is not equal with the current time.
The Delayedcommand task stays in the list and will never be executed.
Continues loops could hang. And had to be resetted manually.
14: Add/Removeobject: Heading value wasnt calculated correctly. And negative values werent possible.
15: Random UCO insimpacket crashes
16: AFKTimer/IdleTimer PlayerVars

See the bug/request tracker in the link below:

Linky

Some feedback whould be nice Tongue
Attached images
Lapperconsole_01.jpg
unnamed (2).jpg
ConsoleColor.jpg
file.jpg
Attached files
LFSLapper V7.0.5.0.zip - 5 MB - 420 views
While being inactive on LFSLapper development. I've decided to upload the first the Public Test version.
Download the version in the first post

This version contains many bugfixes and a few new interesting features.

See the details in the changelog in the first post.
New PublicTest version available. See first post for download

Summary of changes.

=================================================
New:
=================================================

01: New Function: CarSwitches(); //More info in Docs/CarSwitches
-Set switches of your car lights,horn,siren,flash,signals
NOTE: You must be a host to enable this function.

02: New Lapperoption: DebugSettings , in LFSLapper.LPR
When setting one of these options below, it will displayed the executed subs/events/Loops in your Lapper console.
$DisplaySubs = 0; #Player created subs
$DisplayLoops = 0; #DelayedCommand functions,
$DisplayEvents = 0; #(Catch)Events

#Note: These settings are in a testfase, there is a chance that some subs not will be displayed in the console.

=================================================
Updates:
=================================================
01: Sqlite Database libraryfiles. (not mono yet)

Hello,

The devs released a another testpatch with a few insim changes.
One of them is a new insimpacket, which i have implemented in the new PublicTest version of lapper.

Requirements!

YOU MUST DOWNLOAD LFS 0.6R12 TO USE THIS NEW INSIMPACKET.

Check out the first post for the new publictest version. LFSLapper V7.0.4.11_PublicTest_03_R12

Find the event in LFSLapper.LPR


<?php 
##########################################################################################
#Action on Event when a players changed interface mode
##########################################################################################

/*
#### $Mode ####
NORMAL,            // 0 - not in a special mode
OPTIONS,        // 1
HOST_OPTIONS,    // 2
GARAGE,            // 3
CAR_SELECT,        // 4
TRACK_SELECT,    // 5
SHIFTU,            // 6 - free view mode
NUM

#### $SubMode : When a player edit a Object ####
PLAIN,            // 0    no buttons displayed
BUTTONS,        // 1    buttons displayed (not editing)
EDIT_CHALK,        // 4
EDIT_CONES,        // 5
EDIT_TYRES,        // 6
EDIT_MARKERS,    // 7
EDIT_OTHER,        // 8
EDIT_CONCRETE,    // 9
EDIT_CONTROL,    // 10
EDIT_MARSH,        // 11

#### $SelObject: When $SubMode = 11 (EDIT_MARSH) ####

MARSH_IS_CP        = 252; // insim checkpoint
MARSH_IS_AREA    = 253; // insim circle
MARSH_MARSHALL    = 254; // restricted area
MARSH_ROUTE        = 255; // route checker
*/

Event OnInterfaceMode($userName,$Mode,$SubMode,$SelObject,$Time# Player event
/*
    privmsg("UserName: ".$userName);
    privmsg("Mode: ".$Mode);
    privmsg("SubMode: ".$SubMode);
    privmsg("Selected Object: ".$SelObject);
    privmsg("Time: ".$Time);
*/
EndEvent
?>


Attached images
CIMInsimpacket.jpg
It seems that the current Publictest version: PublicTest_03_R12 works without crashing.

If there's a new PublicTest version. You MUST download the latest LFS TestPatch. Otherwise some features wont work.
New PublicTest version available: PublicTest_04

You must download LFS testpatch R12 or higher to run this testversion.

Feel free to give feedback.

===================================
Summary of changes + Example code
===================================

04: New Function: FileExist();
-Check if a file exist.

<?php 
$ExamplePath 
"C:\Users\Danny\Desktop\Testfile.txt";
    IF (
FileExist$ExamplePath ) == 1THEN
        privmsg
("File Exist");
    ELSE
        
privmsg("File does not Exist");    
    ENDIF
?>

05: New Function: GetListOfFiles();
-Get all files from a existing folder

<?php 
    
###################################################
    #Example CODE
    ###################################################
    ### Command ###
    
CASE "!fl":
        
FileList();
    BREAK;
    
   
### Subcall ###    
    
Sub FileList()
    
$UserName getCurrentPlayerVar"UserName" );
    
$Folder "C:\Users\Danny\Desktop\CruiseFolder"
    
$ListOfFiles getlistoffiles($Folder);
    
$FileListButClose "";
    
$RunLoop "TRUE";
    
$FileNumber 1;
    
    
$initTop 40#Startheight
    
$P_H 5;    #Height of button
    
$P_T $initTop + ($P_H); 
    
#================================================
#Background/Title/CloseButton/Filter
#================================================
    
    
openPrivButton("FileList_bgd",39,$initTop-8,108,110,10,-1,16,"");
    
openPrivButton("FileList_title",40,$initTop-7,106,6,10,-1,160,"^7List of Files(".$ListOfFiles["NumberOfFiles"].")");
    
openPrivButton("FileListFolder_title",40,$initTop-7,106,6,10,-1,64,"^7".$Folder);

    
openPrivButton("FileListFNUM_title",40,$initTop-1,6,5,10,-1,32,"^6Nr");
    
openPrivButton("FileListFNAME_title",46,$initTop-1,40,5,10,-1,32,"^6FileName");
    
openPrivButton("FileListFCREATE_title",86,$initTop-1,20,5,10,-1,32,"^6CreationDate");
    
openPrivButton("FileListFMOD_title",106,$initTop-1,20,5,10,-1,32,"^6ModificationDate");
    
openPrivButton("FileListFSIZE_title",126,$initTop-1,20,5,10,-1,32,"^6FileSize");
    
    
openPrivButton("FileList_close",40,$initTop+95,106,6,10,-1,32,"^3Close List",CloseFileList);
    
    WHILE (
$RunLoop == "TRUE")
        IF (
$ListOfFiles[$FileNumber,"FileName"] != "")  THEN    
            $colnumber 
$ListOfFiles[$FileNumber,"FileNumber"];
            
$colname $ListOfFiles[$FileNumber,"FileName"];
            
$colcreationdate $ListOfFiles[$FileNumber,"FileCreated"];
            
$colmodifydate $ListOfFiles[$FileNumber,"FileModified"];
            
$colsize $ListOfFiles[$FileNumber,"FileSize"];    
                
            
openPrivButton("colpos_".$FileNumber,40$P_T6$P_H$P_H, -116 ISB_C2 ISB_C4 $colnumber);
            
openPrivButton("colfilename_".$FileNumber46$P_T40$P_H$P_H, -116 ISB_LEFT"^7".$colname);    
            
openPrivButton("colcreationdate_".$FileNumber86$P_T20$P_H$P_H, -116"^0" .$colcreationdate "");
            
openPrivButton("colmodifydate_".$FileNumber106$P_T20$P_H$P_H, -116"^0" .$colmodifydate "");
            
openPrivButton("colsize_".$FileNumber126$P_T20$P_H$P_H, -116"^0" .$colsize " Bytes");
            
$P_T $P_T 5;
                
            
$FileListButClose $FileListButClose "&colpos_".$FileNumber."&colfilename_".$FileNumber."&colmodifydate_".$FileNumber."&colcreationdate_".$FileNumber."&colsize_".$FileNumber;
            
SetPlayerVar($UserNameFileListClose$FileListButClose);
            
            
$FileNumber $FileNumber 1;
        ELSE
            
$RunLoop "FALSE";
        ENDIF
    ENDWHILE    
EndSub
?>


Attached images
file.jpg
Update: Currently receiving issues with (Host)(Priv)DelayedCommand functions();

Info about the DelayedCommands:

Which could stop when the SetTime of the delayedcommand() not equals with the current time. Lapper cannot execute the DelayedCommand anymore.

i'm looking into the sourcecode to see, if anything could be done without making the delayed command not compatible with older scripts.
New PublicTest version available. Go to first post to grab the new testversion.

Changes:


=================================================
New:
=================================================
01: New Lappervar: 'Lapperstate'
-Check which state your lapper is. Stable or experimental etc

=================================================
Updates:
=================================================
01: Update TrackList.cfg . Thanks Sinanju :)
02: Event OnObjectInfo($userName,$NumO,$Action,$X,$Y,$Z,$Type,$InDex,$Heading) # Player event
//Added new value for $Action
//Get GroundLevel ZByte.
=================================================
Fix:
=================================================
01: (Priv/Host)Delayedcommand: Cannot be executed when settime is not equal with the current time.
The Delayedcommand task stays in the list and will never be executed.
Continues loops could hang. And had to be resetted manually.

New PublicTest version available. Grab the testversion in the first post.

Thanks to everyone for testing.

=================================================
Updates:
=================================================
01: It is now possible to not allow AI drivers to join race. MANY THANKS TO LakynVonLegendaus
####################
#Disable AI drivers#
####################
# Enable (1) or disable (-1) $DisableAI option
# If enabled, LFS will not allow AI drivers to join race (/ai) and all AI drives that are already on
track will be spectated on Lapper start/reload
$DisableAI = -1;

02: Add/Removeobject: Floating values for X / Y / Z axis are now possible
ExampleCode:

GlobalVar $GateOpen; $GateOpen = "19.38:-654.38:0.75:208:175:-70";
GlobalVar $GateClosed; $GateClosed = "21.38:-654.38:0.75:5:174:-70";

=================================================
Fixes:
=================================================

01: Add/Removeobject: Heading value wasnt calculated correctly. And negative values werent possible.

I haven't run any of these test-version (too busy getting my life back on track), but want to thank you for all your efforts towards Lapper.
So, thanks for all the hard work and keeping this wonderful piece of software alive.
Thanks you Yisc for the kind words. I still like it to work on it. And i see more people using Lapper.
New PublicTest version available: 7.0.5.0 PublicTest_6A

AddObject()/RemoveObject(): Values of the object incorrect when one the Axis values are negative.

Thanks Iceman121 for the report.
Thanks for your continuous work and support on LFSLapper. I'm 100% sure everyone appreciates your work. Smile
New PublicTest version available: 7.0.5.0 PublicTest_7. Check first post to download the new TestVersion.

Thanks to LakynVonLegendaus for making this Testversion:

Heres a summery of changes what he has done.


=================================================
Updates:
=================================================
01: Add/Removeobject: Non-floating input values will now be converted into floating values
02: Lapper no longer returns $userName converted to lowercase format
03: UserGroupToFile no longer converts usernames to lowercase format


The official version of LFSLapper V7.0.5.0 has been released.
Grab the version in the first post.

Credits:

LakynVonLegendaus: For adding/editing code
Iceman121: Reporting bugs and testing.
Thanks guys for another release.
Great to see this application getting better and better.

Release: LFSLapper V7.0.5.0
(16 posts, started )
FGED GREDG RDFGDR GSFDG