+-------------------------------+
|Changes from 7.0.4.3 to 7.0.4.4|
+-------------------------------+
=================================================
New:
=================================================
1. New LapperFunction: AllowedPlayerCars($UserName,$Cars);
$UserName = Bass-Driver;
$Cars = XFG+XRT+RB4;
AllowedPlayerCars($UserName,$Cars);
2. New LapperVar: GetLapperVar("racetime");
Time will be reset after restarting the race.
=================================================
Update: Lappercore/Script Updates.
=================================================
1. Update Sub Callback for RegisterNodeAction() & RegisterZoneAction()
The Callback Sub for RegisterNodeAction() & RegisterZoneAction() is having a extra variable.
Example:
RegisterNodeAction( TESTID, getLapperVar( "ShortTrackName" ) , getCurrentPlayerVar("CurrNode") , test,"" );
Sub test($UserName,$ZoneID)
privmsg("ID=".$ZoneID); #output is TESTID
EndSub
Now it is possible to call this sub with differend Node/Zone actions
=================================================
Fixed: Lappercore fixes.
=================================================
1. Event OnAngleVelocity( $userName )
This event will now also execute with negative Angle values. (When you cars spins to the right or to the left)
Previously, only executes when car spins to the left.
2. RemoveNodeAction();
Lapper crashed when removing node with invalid NodeID.
3. RemoveZoneAction();
Lapper crashed when removing zone with invalid ZodeID.
Event OnCarStateChanged($userName,$StateOfCar)
IF($StateOfCar == 0)THEN
globalmsg(getplayervar($userName,"NickName")."^7 Stopped the car!");
ENDIF
IF($StateOfCar == 1)THEN
globalmsg(getplayervar($userName,"NickName")."^7 Start driving!");
ENDIF
EndEvent
// acceleration1
if (speed < 0.1)
{
this.timeSinceZeroSpeed = System.DateTime.Now;
this.accelerationInProgress = true;
}
else if (speed > 100 && this.accelerationInProgress)
{
this.accelerationTime = System.DateTime.Now - this.timeSinceZeroSpeed;
this.accelerationInProgress = false;
this.accelerationTimeValid = true;
}
bl1|bridge|-86|-264|0
bl1|sdads|-99|154|10
bl1|pitbox|-100|155|10
bl1|sadasd|-99|154|10
bl1|test01|1|322|0
<?php
#########################################################
#JRR Command Info:
#########################################################
#########################################################
#########RESET YOUR CAR (with or without repair)#########
#########################################################
Set $Flags = 128;
Set $UCID = 0;
$PLID = getcurrentplayervar("PLID"); #PLayer's unique ID
or
$PLID = players id here; #PLayer's unique ID
To see your PLID type !plicid
If you want to reset your car on your current position:
$X_Axis = getcurrentplayervar("X"); #X axis SpawnPoint
$Y_Axis = getcurrentplayervar("Y"); #Y axis SpawnPoint
$Z_Axis = getcurrentplayervar("Z"); #Z axis SpawnPoint
ELSE
$X_Axis = 0; Fill in the X coordinate
$Y_Axis = 0; Fill in the Y coordinate
$Z_Axis = 0; Fill in the Z coordinate
You can drive to a location and type !zone to see the coordinates of that location
$JRRAction = 4; = Reset with repair
$JRRAction = 5; = Reset without repair
###################################################
*/
CASE "!jrr":
privmsg("Test JoinRequest");
$X_Axis = getcurrentplayervar("X"); #X axis SpawnPoint
$Y_Axis = getcurrentplayervar("Y"); #Y axis SpawnPoint
$Z_Axis = getcurrentplayervar("Z"); #Z axis SpawnPoint
$Flags = 128; #Move/Reset car (128) else (0)
$Heading = 0; #Heading of the players car at Spawnpoint
$UCID = 0; #Connection's unique id (0 = host)
$PLID = getcurrentplayervar("PLID"); #Player's unique id
$JRRAction = 4;
joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading , $UCID , $PLID ,$JRRAction); #Send Data to LFS
BREAK;
CASE "!plicid":
privmsg("Your UCID: ".getcurrentplayervar("UCID"));
privmsg("Your PLID: ".getcurrentplayervar("PLID"));
BREAK;
###################################################
?>
+-------------------------------+
|Changes from 7.0.4.1 to 7.0.4.2|
+-------------------------------+
1. New Function: joinrequest(); JRR Insimpacket
2. Changed:
Characterlenght increased to 120 chars instead of 67 for the following functions:
Privmsg();
GlobalMsg();
3. Fixes:
#########
Fixed Typo's & Changing Pitworks in sourcefile Insim4.cs ( Thanks to Iceman121 for reporting the typo's and idea's)
-Mechanicals Damages >> Mechanical Damage
-Body Dammage >> Minor Damage
Major Damage
-Refuel >> Refuelling
-Wheels & Transmissions >> Wheels
#########
Sourcecode bugfix: in GLScript.cs ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906238#post1906238
#########
Sourcecode bugfix (CSC) (CarState Packet) implemented in version 7.0.4.1
LFSLapper crashed after getting player without a username (HOST)
#########
Minor bugfixes in LFSLapper.lpr ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906123#post1906123
<?php
//Convert Short X into 2 bytes
packet[8] = (byte)(X >> 8); //Shift by 8 bits
packet[9] = (byte)(X & 255);
//Convert Short Y into 2 bytes
packet[10] = (byte)(Y >> 8); //Shift by 8 bits
packet[11] = (byte)(Y & 255);
?>
<?php
//Convert Short X into 2 bytes
packet[8] = (byte)((X * 16) & 255);
packet[9] = (byte)((X * 16) >> 8); //Shift by 8 bits
//Convert Short Y into 2 bytes
packet[10] = (byte)((Y * 16) & 255);
packet[11] = (byte)((Y * 16) >> 8); //Shift by 8 bits
?>
<?php
//Convert Short X into 2 bytes
packet[8] = (byte)((X >> 8)/16); //Divide by 16
packet[9] = (byte)((X & 255)/16); //Divide by 16
//Convert Short Y into 2 bytes
packet[10] = (byte)((Y >> 8)/16); //Divide by 16
packet[11] = (byte)((Y & 255)/16); //Divide by 16
?>
Input X/Y Axis >> Output
0-15 >> 0
16 >> 16
17-31 >> 16
32 >> 32
33-47 >> 32
48 >> 48
etc