public byte[] OCO(byte OCOAction, byte Index, byte Identifier, byte Data)
{
byte[] packet = new byte[8];
packet[0] = 8 * 4;
packet[1] = (byte)TypePack.ISP_OCO;
packet[2] = 0;
packet[3] = 0;
packet[4] = OCOAction;
packet[5] = Index;
packet[6] = Identifier;
packet[7] = Data;
return packet;
}
// OK For Insim 7
//Admin Command Report ( added @ 16-10-2017)
public class ACR // Size 12, 16, 20... 72 depending on Text
{
public readonly int PacketSize; // 12, 16, 20... 72 depending on Text
public readonly int ReqI; // 0
public readonly int UCID; // Unique Connection ID
public readonly int Admin; // set if user is an admin
public readonly int Result; // 1 - processed / 2 - rejected / 3 - unknown command
public readonly int Sp3; // Spare 3
public readonly string Text; // 4, 8, 12... 64 characters - last byte is zero
public ACR(byte[] packet)
{
PacketSize = pakGetByte(packet * 4, 1); //1 Byte (multiply 'packet' by 4) ??
ReqI = pakGetByte(packet, 2); //1 Byte
UCID = pakGetByte(packet, 4); //1 Byte
Admin = pakGetByte(packet, 5); //1 Byte
Result = pakGetByte(packet, 6); //1 Byte
Sp3 = pakGetByte(packet, 7); //1 Byte
Text = pakGetString(packet, 8, 64); // 4, 8, 12... 64 characters - last byte is zero
}
}
+---------------------------------------------------------------+
|Changes from 7.0.8.1 to 7.0.9.0 TEST #6
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: [Playervar]: "SkinName". GetPlayerVar("SkinName");
2: [LapperFunction]: SetListAllowedMods(); Set allowed mods. Max 120 mods allowed
CASE "!setmodlist":
SetListAllowedMods("4A1C57,FA2989,39CEEB,238F06");
#SetAllowedMods(""); #Allow all mods.
BREAK;
3: [LapperFunction]: GetListAllowedMods(); Get list of allowed mods.
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;
4: LFS Rest API (request info about a certain mod) Test #1
-Register your LFSLapper @ https://www.lfs.net/account/api
-Fill in your ClientID and ClientSecret in myInc.LPR (includes/myinc.lpr)
-2 differend ways to request modinfo , by username(must be on track!!!) or by SkinID
$modinfo = getmoddedcarinfo("Bass-Driver");
or
$modinfo = getmoddedcarinfo("E25059");
-Variables in testscript below or in (includes/optional/lfsrestapi_Info.lpr)
=================================================
Changed:
=================================================
1: LFSLapper Insim version changed to version 9. Only compatible with LFS W43 and higher
2: Update: 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
=================================================
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
bin\default\includes\guiconfig.lpr
$DriftDatabase = "./DriftPB";
$DriftDatabase = "Databases/DriftPB";
$StoredValueDbs = "Databases/storedvalue";
$GripDatabase = "Databases/GripPB";
'./PBgrip' instead of './Databases/PBgrip'.