Hello LFSLapperusers.
I'm proud to release a new version of LFSLapper: V7.0.9.0
Thank you all, who helped me with the coding stuff. learned alot during this development.
This version contains the insimpacket changes and the implementation of LFSRestAPI to get info of mods.
[NOTE]:This Lapper version doesn't work on LFS versions older than 0.7A
Have fun and see you on the track.
Check out the summary of changes below.
I'm proud to release a new version of LFSLapper: V7.0.9.0
Thank you all, who helped me with the coding stuff. learned alot during this development.
This version contains the insimpacket changes and the implementation of LFSRestAPI to get info of mods.
[NOTE]:This Lapper version doesn't work on LFS versions older than 0.7A
Have fun and see you on the track.
Check out the summary of changes below.
+---------------------------------------------------------------+
|Changes from 7.0.8.1 to 7.0.9.0
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: [Playervar]: "SkinName". GetPlayerVar("SkinName");
2: [LapperFunction]: SetListAllowedMods(); Set allowed mods. Max 120 mods allowed
CASE "!setmodlist":
#Set certain mods.
SetListAllowedMods("4A1C57,FA2989,39CEEB,238F06");
#Allow all mods.
SetListAllowedMods("");
BREAK;
3: [LapperFunction]: GetListAllowedMods(); Get list of allowed mods.
#example
CASE "!getmodlist":
$List = getlistallowedmods();
$NrOfMods = ToNum($List["NrOfAllowedMods"]);
privmsg("^7===== ^3List of Allowed mods ^7(".$NrOfMods.") ^3mods ^7=====");
IF($NrOfMods == 0) THEN
privmsg("^3All mods are allowed!");
ELSE
FOR ( $i = 0; $i < $NrOfMods ; $i = $i + 1)
privmsg("^7Mod ^0[^3".$i+1."^0]^7: ".$List[$i,"SkinID"]);
ENDFOR
ENDIF
BREAK;
=================================================
LFS REST API: Get list of mods
-Register your LFSLapper @ https://www.lfs.net/account/api
-Fill in your ClientID and ClientSecret in myInc.LPR (includes/myinc.lpr)
=================================================
4: [LapperFunction] getmodinfo(""); Get modinfo
-2 differend ways to request modinfo , by username( player must be on track!!!) or by SkinID (getcurrentplayervar("Car"))
$modinfo = getmodinfo("Bass-Driver");
or
$modinfo = getmodinfo("E25059");
#example: privmsg("Name of mod:".$modinfo["name"]."");
list of variables:
status,id,name,descriptionshort,description,userid,username,wip
publishedat,numdownloads,currusage,rating,numratings,staffpick
tweakmod,version,lastdownloadedat,class,ev
icecc,icenumcylinders,icelayout,evredLine,drive,shifttype
power,maxpowerrpm,mass,bhp,powerweightratio,bhpton,fueltanksize
5: [LapperFunction]: updatelistofmods(); Get the new list of mods from the API to Update the list in LFSLapper.
6: [LapperFunction]: getlistofmods(); Get List of mods: #use updatelistofmods() before calling this function.
#Example:
IF(ToNum($list["numofmods"]) > 0) THEN
FOR($i = 0; $i <= 15; $i = $i + 1)
privmsg($list[$i,"name"]." (".$list[$i,"id"].")");
ENDFOR
ENDIF
list of variables:
status,id,name,descriptionshort,description,userid,username,wip
publishedat,numdownloads,currusage,rating,numratings,staffpick
tweakmod,version,lastdownloadedat,class,ev
=================================================
Changed:
=================================================
1: LFSLapper Insim version changed to version 9. Only compatible with LFS W43 and higher
2: [LapperFunction]: Event OnObjectHit() New argument to get contactspeed when hit an object:
$ContactSpeed
3: [Playervar]: GetPlayerVar("Car"); , Will now display the SkinID, if you've selected a mod.
4: Updated trackList.cfg (bin/trackList.cfg)
5: Updated ObjectList.txt (doc/objectslist.txt)
=================================================
Fix:
=================================================
1: Some autoX objects didnt match with their objectindex number
2: [Lappercrash] when loading more than 30 objects at once
3: [Event]: OnPlayerSelectCar() didnt displayed the name of the car correctly
4: [Event]: Several Events like (OnDist, OnDriftScore) didnt execute when more than 8 players on the track
Caused by MCI packets when more than 8 player are on the track