Version 0.2
Last Updated 4/18/2021
Over the course of several months, I have developed a menu that allows you to add lightbars on any vehicle you want. The basic premise is that you drive a vehicle to designated areas, (Defaultly garages as all police departments) hit F6. You will be met with a menu and are able to select which type of lightbar you wish to spawn. Then, use your Arrow Keys and other keys indicated by the hint to move and rotate the lightbar. When you have placed it where you want it to be attached, simply hit SPACE and it will be attached. You may add multiple lightbars to the same vehicle and they are usable by all players. I have previously been holding off on releasing this script, as I intended this to be used privately, however, have recently changed my mind.
Videos and Images
Key Bindings
Open Menu: F6
Move Forward: Up Arrow Key
Move Backward: Down Arrow Key
Move Left: Left Arrow Key
Move Right: Right Arrow Key
Move Up: Page Up
Move Down: Page Down
Flip: INS and DEL (Above arrow keys)
Cancel Lightbar Placement: Backspace
Confirm Placement: Space bar
Activate Lights: Q
Activate Horn: E
Activate Sirens: G
Cycle Siren Tones: Left Control
Installation
Simply Drag into your resources folder and add both resources to your startup list in the server config
Note Make sure you start the NativeUI resource before the others and start all three of them in order for everything to work properly.
EXTREMELY IMPORTANT: Currently, the menu is accessible by all players, meaning that anyone can use it. In order to defeat this, you must replace the commented out if statement on line 435 with whatever your server uses to check if the player is an on duty officer.
Note for ESX users: I believe the following line should work, but I am not familiar with ESX, so donāt quote me on it.
if(ESX.TriggerServerCallback(āesx_service:isInServiceā, function(isInService)) then
Someone commented that this might work also, but yet again, not sure:
if(ESX.GetPlayerData().job.name == āpoliceā or ESX.GetPlayerData().job.name == ācnpā) then
Additional Notes
This script has not been tested on a large scale and consequently may have minor glitches. Please report these so they can be fixed. If you have any questions as to how to do something, feel free to ask.
Finally, I have invested many months into making this work and brainstorming ideas. Please do not pass this off as your own.
Important:
Updates
Unfortunately, I have not had much time to continue working on this script, so it might be rather out of date. Several comments have suggested that this script has issues running one OneSync servers, which very well might be the case considering I only ever tested this on a default, 32 slot server. I will attempt to look into this and possibly fix it shortly.
Update 0.2:
- Added additional ESX compatibility statement to installation notes