The online racing simulator
Lapper Code Help (Soawn System !jrr)
What is the logic of the Spawn system on the currently active JUST DRIVE server? I think maybe changing the PLIC ID of the players might work, but I'm not sure

In addition, I changed the !jrr command to !rp without any problems, second thing I want to do is Reverse the HEADINGs of the Tools In short, I want to Rotate the Vehicle 180 degrees. I tried with many math operations but failed. Thanks in advance to everyone who helped.
** Best answer **
First you have to check what the current 'Heading' of the car is

You can do that with the playervar : Getcurrentplayervar("Heading");
You may use this in a command like the code below.

CASE "!heading":
privmsg("Current heading of the car: ".getcurrentplayervar("Heading"));
BREAK;

Then you have rotate the car 180 degrees

Example:

Values of JoinRequest goes from (0 - 180) and (-1 -179)

Current heading is 90
Set headingvalue in joinrequest() to -90

Current heading is 45
set headingvalue in joinrequest() to -135

Thank you for your help. I did a study with your idea. It is working now. Even if it is a novice, it may be useful for other users. I am new to these topics.


CASE "!rt":
$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 = getcurrentplayervar("Heading"); #Heading of the players car at Spawnpoint
$UCID = 0; #Connection's unique id (0 = host)
$PLID = getcurrentplayervar("PLID"); #Player's unique id
$JRRAction = 4;
$heading12 = (getcurrentplayervar("Heading") ;
IF (getcurrentplayervar("Heading") < 0)
THEN
PrivMsg("^T^7Araç Çevirme ^2Başarılı");


joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading+180 , $UCID , $PLID ,$JRRAction); #Send Data to LFS
ELSE
PrivMsg("^T^7Araç Çevirme ^2Başarılı");
joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading-179 , $UCID , $PLID ,$JRRAction); #Send Data to LFS
ENDIF

Nice to see, that you got the code working.
Its trial and error to understand how the code works. I'm sure you can build some nice scripts around it.

Also if a piece of code isn't working, you could check the xxx.xxx.xxx.xxx-yyyyy.ERR files(error logs) to check if something is wrong.
Of course, if I encounter an error, I will now look at the first log record.

Quote from Bass-Driver :Nice to see, that you got the code working.
Its trial and error to understand how the code works. I'm sure you can build some nice scripts around it.

Also if a piece of code isn't working, you could check the xxx.xxx.xxx.xxx-yyyyy.ERR files(error logs) to check if something is wrong.


FGED GREDG RDFGDR GSFDG