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
<?php
$X_Axis = 1; #X axis SpawnPoint
$Y_Axis = 1; #Y axis SpawnPoint
$Z_Axis = 0; #Z axis SpawnPoint
$Flags = 128; #Move car (128) else (0)
$Heading = 30; #Heading of the players car at Spawnpoint
$UCID = 0; #Connection's unique id (0 = host)
$PLID = getcurrentplayervar("PLID"); #Player's unique id
$JRRAction = 5; #Type of action. Reset without repair
joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading , $UCID , $PLID ,$JRRAction); #Send Data to LFS
?>
<?php
public void joinrequest(GLScript.unionVal val, ArrayList args)
{
//short X, short Y, byte Zbyte, byte Flags, byte Heading, byte UCID, byte PLID, byte JRRAction
byte[] jrr = myEncoder.JRR(short.Parse(args[0].ToString()), short.Parse(args[1].ToString()), byte.Parse(args[2].ToString()), byte.Parse(args[3].ToString()), byte.Parse(args[4].ToString()), byte.Parse(args[5].ToString()), byte.Parse(args[6].ToString()), byte.Parse(args[7].ToString()));
insimConnection.Send(jrr, jrr.Length);
}
?>
<?php
public byte[] JRR(short X, short Y, byte Zbyte, byte Flags, byte Heading, byte UCID, byte PLID, byte JRRAction) //Join Request Reply - send one of these back to LFS in response to a join request
{
byte[] packet = new byte[16];
packet[0] = 16;
packet[1] = (byte)TypePack.ISP_JRR;
packet[2] = 0;
packet[3] = PLID; //Player's unique id (if zero, use UCID) // ZERO when this is a reply to a join request - SET to move a car
packet[4] = UCID; //Connection's unique id (0 = host) // set when this is a reply to a join request - ignored when moving a car
packet[5] = JRRAction; //JRR Action
packet[6] = 0; //Spare
packet[7] = 0; //Spare
//Convert Short X into 2 bytes
packet[8] = (byte)(X >> 8);
packet[9] = (byte)(X & 255);
//Convert Short Y into 2 bytes
packet[10] = (byte)(Y >> 8);
packet[11] = (byte)(Y & 255);
packet[12] = Zbyte; //Z Pos
packet[13] = Flags; //Flags
packet[14] = 0; //Index
packet[15] = Heading; //Heading
//DebugMessages to see data for each packet (Console)
for (int i = 0; i < 16; i++)
{
Console.WriteLine("Packet: "+ i + " = " + packet[i]);
}
return packet; // send packet to lfs
}
?>
<?php
CASE "!jrr":
$X_Axis = 0; #X axis SpawnPoint
$Y_Axis = 0; #Y axis SpawnPoint
$Z_Axis = 0; #Z axis SpawnPoint
$Flags = 128; #Move 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 = 5; #Type of action.
joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading , $UCID , $PLID ,$JRRAction); #Send Data to LFS
BREAK;
?>
########################################################
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
########################################################
Characterlenght increased to 120 chars instead of 67 for the following functions:
Privmsg()
GlobalMsg()
########################################################
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
GetCurrentPlayerVar( "InstantSpeed" );
CASE "!myspeed":
privmsg("My speed: ".GetCurrentPlayerVar( "InstantSpeed" ). " km/h");
BREAK;
May 13 15:47:52 HoraDoShowPorra^L connected (105DaLeste)
May 13 15:48:00 HoraDoShowPorra^L left the pits (XRG)
May 13 15:48:30 HoraDoShowPorra^L pitted
May 13 15:48:32 HoraDoShowPorra^L left the pits (XRG)
May 13 15:48:32 Modified car - guest disconnected
May 13 15:48:33 Leave @ 1136527 : HoraDoShowPorra
May 13 15:48:33 HoraDoShowPorra^L was kicked (105DaLeste) <<< This is what other guests/admin sees in the server.