Works fine now Is there any way to hear people in the spectate mode? I’m using proximity voice and because of that I can’t hear people that I spectate. It would be awesome if there was an option to hear people that we are spectating
Short Answer: No, I don’t see myself adding Player/Vehicle saving anytime soon.
Long Answer: I was working on a vehicle & player save but it’d require a database and I really didn’t want to deal with CouchDB. I am currently working on a character/vehicle save but it is pretty customized for what my end goal is (Different accounts & vehicle garages) so I doubt I’ll ever come back to this feature here.
The logistics behind the spectate is your character stays in place but your camera changes to one programmed to follow the desired player.
To actually hear the players in-game chat we would have to move your character to be physically within range of the target which can lead to many issues.
Add data-require="admin" to those elements. Seeing as this is created from static JSON you will need to update the var vehicle_emergency JSON found in trainer.js (line 1131)
I haven’t tested this personally but I’m 90% sure this will work.
EDIT: You could also update the “admin” to whatever you’d like and create a new NUICallback to handle it.
In example, if you change “admin” to “emergency” and add the below code you will have just created a new requirement to do something. This could be expanded upon to create extremely complex permissions.
RegisterNUICallback("requireemergency", function(data, cb)
-- Check if they should have access and store it as a true/false variable.
local result = ""
-- Check true/false variable
if(result)then
SendNUIMessage({adminaccess = true}) -- Do the requested action
else
drawNotification("You can't access this.") -- Don't do the requested action
end
end)
if you require something that doesn’t have a NUICallback defined it will never succesfully trigger that trainer option.
Love this trainer so far only things Ive noticed is Torq Boost and power boost do nothing all cars only get to 103 max no matter what setting I set it to and I hafta get out of the car to reopen the trainer. And I could never fully use this for the server unless we can save all our police cars and Uniforms. But man I love what you have done so far, and love the fact I can change things like the Weapons they can use and Banned Supercars and so on. Look forward to the update when we can save things. 8 stars out of 10 Nice work and Thank you so mutch for sharing this! It will help so many servers against Trolls.
what hex is for the steam id? numbers, the name, what? also im trying to add my addon cars to this menu but no luck plus i dont see where the spawn names are ive looked in all the files
@mrdigital01 & @Psychorustle, V 0.2.1 has been pushed which adds the ability to lock the entire trainer to admin-only usage. See the Original Post under Features.
@Xnitro67 Most of the menu is created via static JSON located at the end of the trainer.js file. To add vehicles search for var vehicle_ add add the new options where preferred.