short story, basically the server I dev for wanted a way to clear all vehicles in the server because
all /dv scripts on the forums are broken with 1s with no apparent reason.
the FiveM player base doesn’t know how to delete their f*****g cars when they’re done with an rp.
I created a command that gets all vehicles in the server using IllidanS4’s entity iterator. and goes through a check to see if a person is in the driver’s seat, then several more checks to see if the vehicle was actually deleted, and then finally a nice little fraction at the end to tell you how many vehicles were actually deleted. Download can be found on my GH https://github.com/Whit3XLightning/wld-delallveh please read the config.lua for more help on setup. If you have any other questions you can ask.
P. S. to the forum admin that’s going to lock my post because I copied Delete This pls s you can clearly see that my work was commited to GitHub days ago and our code is not even close.
I can help you with that, is very easy you can do it in multiple ways.
I got an idea and you can do that in a few minutes, so:
— server
if you pass a number arg. after the default command: trigger the event only for your client (source).
— client
if the event has that number (something like AddEventHandler("wld:delallveh", function (range) check if the distance between player_ped and vehicle is <= range
I see it has the ability to use ace perms. I was wondering if it would be possible for it to recognize the groups set in vmenu? We have group.moderator and group.admin for our staff in vmenu’s permissions and it would be nice if we could set this script to just allow group.admin to be able to run it vs everyone on our server and not have to update this scripts perms anytime we add or remove an admin. Ideally, we could just add/remove them from vmenu which we have to do anyways to allow them access to things like noclip, spectate, and teleport to player, so having this script as well recognize that would be fantastic.
You don’t have to do any modifcations to the script for it to work like that. You just have to know how to use ace permissions. add_ace group.admin command.[commandName] allow as stated in the config.lua