The online racing simulator
Spawnsystem
Update:
Creating a script to spawn players easily.
It is not finished yet. But the basics are working well.

At the moment i'm working on Set/Save locations to spawn the current player to that location.
See the attachment for the current state of the GUI.
Attached images
spawn.jpg
Looking very good.
You are doing a lot of good work for Lapper lately, keep it up.
Small Scriptupdate:

-Added Saving/Delete Locations and tested with many drivers in the server.
-Only the saved locations for the current track will be loaded.
-Saved Locations will be saved in a textfile.

Looks like this inside the textfile:


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

Things todo:

-Working Deletebutton
-Few protections against spawning spectating players or spawning players without any valid X/Y/Z axis (will be updated in the sourcecode later)
-Display more than 14 locations and 16 players
Attached images
spawn02.jpg
SpawnScript - V0.1
Hello Everyone,

Since releasing the LFSLapper version with the JRR insimpacket, i decided creating this spawnscript for public release. https://www.lfs.net/forum/post/1909952#post1909952
But since i have been working on other lapper projects, i havent spend any time on this script.

Now i'm pleased to release the first "working" version.

Note: this script is only usefull if you want to respawn a player to a another location.

Features:
  • -Spawn other players
  • -Add/Remove locations (Go to the location that need to be stored)
  • -Set heading of the car
  • -Select type of spawn (Repair/Not repair)

###############################
#HOW TO INSTALL THE ADDON
###############################

-Be Sure you have the latest version of LFSLapper: https://www.lfs.net/forum/thread/58433-Release.
-Copy and Paste the 'SpawnSystem' folder into the Includes Folder. (\bin\default\includes)
-Open the "addonsused.LPR" file (\bin\default\includes\addonsused.LPR) and add the following lines:
  • include( "./includes/SpawnSystem/SpawnSystem.lpr");
To open the spawnmenu ingame: Type !spawn

Have Fun.
Attached files
SpawnSystem.rar - 2.7 KB - 351 views
Good Bass-Driver, sorry for the inconvenience, but is there any way to make it when users go through node 188 to return them to a spawn zone? As in the Drag Addon that when 4 users go through X node it returns them to a different position to each one
You can do that using RegisterNodeAction and then a Sub-routine to do the spawning.
Quote from Yisc[NL] :You can do that using RegisterNodeAction and then a Sub-routine to do the spawning.

But what you do not do is to read one user and then another, I want you to read 4 users and I sent each one to a different position
Well, that depends how you want to go about it.
If you want to send the first 4 people to a different location that reach that node, you can use a simple counter.
If the first person that reaches the node, triggers the action, you will need to find a way to pick out the other 3.
In case they are in a race, it would be easy to select the number 2,3 and 4 and re-locate them.
Maybe I am missing something, but all of the above seems relatively easy to accomplish with Lapper.
Quote from Yisc[NL] :Well, that depends how you want to go about it.
If you want to send the first 4 people to a different location that reach that node, you can use a simple counter.
If the first person that reaches the node, triggers the action, you will need to find a way to pick out the other 3.
In case they are in a race, it would be easy to select the number 2,3 and 4 and re-locate them.
Maybe I am missing something, but all of the above seems relatively easy to accomplish with Lapper.

What I want is something similar to what has the "Drag Addon" of Bass-Driver that when there are 4 runners running and arrive for example to the node 188 the return to the 4 runners to different positions
Here a small explaination how i did this:

1) Add a insim circle. When someone drives into that circle the following event will be executed.


Event OnCrossingChecker($userName,$Flags,$Time,$Object,$UserSpeed,$CircleIndex)
EndEvent

2) Created a globalvar ($CountPlayers for example) that will count the many players who entered the circle.
So for each player that will enter the circle +1.

IF ($CountPlayers == 1) THEN
#Blah
ENDIF

3) Use the joinrequest() function to spawn the players to the moon.
Quote from Bass-Driver :Here a small explaination how i did this:

1) Add a insim circle. When someone drives into that circle the following event will be executed.


Event OnCrossingChecker($userName,$Flags,$Time,$Object,$UserSpeed,$CircleIndex)
EndEvent

2) Created a globalvar ($CountPlayers for example) that will count the many players who entered the circle.
So for each player that will enter the circle +1.

IF ($CountPlayers == 1) THEN
#Blah
ENDIF

3) Use the joinrequest() function to spawn the players to the moon.

But in the demo version you can not add insim circles
Sorry for the disturbances
Well instead of using the Insimcircles. Use RegisterNodeAction and then a Sub-routine like Yisc[NL] said.
You know I have a mistake that when using !jrr the car is not respawn
Show me the code, before i test my own code. Tongue

FGED GREDG RDFGDR GSFDG