The online racing simulator
Is it possible to make the !drag command work only in a specific area?
Hello, Smile

On my server, I have a drag light system that works with the !drag command. However, when I use this command, all players can see the drag lights. What I want is to make this system work only in a specific drag area.

In other words, I don’t want players to be able to use !drag anywhere on the map — it should only be active in the defined drag zone.

Is there a way to coordinate or restrict this?

Thanks.


prnt.sc/GrgQdkIBlMtf
Yes, it is possible. Just let the drag lights to show only if the player is in spefified position
Check open sources for cruise insim at MCI packets and you will find out
Hope it helps (:
The simple drag system I made is for use with LFSLapper ("lapper").

It uses global buttons (openGlobalButton), which means that everyone sees it.

You could change that to private buttons (openPrivButton) so that only the person who enters the !drag command sees the lights.

If you want the lights to only appear in a certain area, you would have to register a node or a zone.

If you want a more developed drag system, you could try Bass-Drivers system (HERE).

I tried to make a drag system before that, but it only partly worked as I couldn't get the penalty part working. Can be found HERE.
Quote from sinanju :The simple drag system I made is for use with LFSLapper ("lapper")...

Thanks a lot for the explanation! 🙏
I understand the difference between openGlobalButton and openPrivButton, that’s very helpful.

What I still need is to restrict the !drag command so that it only works in a specific area (for example, the drag strip). Since I’m new to InSim/Lapper, I’m not sure how to properly define a node/zone or check player position with MCI packets.

Could you maybe give me a small example (or point me to one) on how to set up such a zone check in Lapper? That would help me a lot.
Firstly, you don't have to worry about MCI or other packets with lapper.

The code within lapper, which runs in the background, does all the packet work for you.

In the main, you specify a lapper Event (eg Leave Pits) and execute your own code (eg show button/text) and/or run a sub-routine.

I'd suggest downloading my original drag script and the AU1 layout, which are both in the zip file in the 1st post (HERE). At the same time, have read through all the posts, as there's some useful information there.

Along with the files, you can have a look at the video I made, which shows both the layout and what the script actually does.



I'm not sure if you know the difference between Nodes and Zones, but I made a post about it to explain HERE, which helps explain.

As for how to only show lights to only the drivers you want to have a drag race, that's beyond my capabilities.

Probably what I'd do, is just have a Global message advising drivers not involved in the drag race to stay out of the drag area while lights are on. Although if lights are up and running, should be fairly obvious whats going on.
When I tested it on a server in the demo, the light remains stationary and does not move. I heard that the location coordinates can be set so that they are not visible to everyone. What can I do about this drag system?

Frown


The drag commands you shared are good, but the light remains stationary, it does not move like in this video, I want a drag system, what can I do for this?

FGED GREDG RDFGDR GSFDG