[RE-RELEASE] /dvall deletes all unoccupied vehicles on the map (With/Without Automatic DV)

Hello Community, Today I’m going to be Re-Releasing a script made by Whit3XLightning I have gotten his permission to do so.
This is a delete all vehicles script off the map by doing /dvall. the script will announce to all players via chat giving them 30 seconds to get into their vehicles before deleting. There are two options to choose from rather you want a manual version or and automatic version

the manual version you’ll just need to type the command /dvall
the automatic version you can also type the command /dvall or change the automatic delay in server.lua from 30 minutes to your liking.

I’m not the best at scripting but its a way I figured out to make it work.

Preview:
Screenshot (21)

Hope you enjoy it!

Github: NON Auto

Github: With Auto

9 Likes

Wonderful

this is nice , Can you let it will be automatic ? people can set the time, how long we want to dv

thank you my first release

you can change how long before it dv. all you need to do is change the Wait() for everysingle one in the server/server.lua.
for instance if you want to make it 20 seconds instead of 30 you’ll need to do this

RegisterCommand(Config.commandName, function(source, args, rawCommand, user)

TriggerClientEvent(‘chatMessage’, -1, “^*^1 MASS DV, PLEASE GET INTO YOUR VEHICLES! (^3 20 SECONDS ^1)”) # First Announcement

Wait(10000) # 10 seconds

TriggerClientEvent(‘chatMessage’, -1, “^*^1 MASS DV, PLEASE GET INTO YOUR VEHICLES! (^3 10 SECONDS ^1)”) # Second announcement

Wait(10000) # 10 seconds

TriggerClientEvent(‘chatMessage’, -1, “^*^5 MASS DV COMPLETE!”) # Final Announcement

Wait(1) # 1 milisecond, Dont touch

TriggerClientEvent(“wld:delallveh”, -1) end, Config.restricCommand)

Nah I mean can we set every 1hour be dv the car , that we dont need to use command and there will be automatic

1 Like

i will check into that, im not the best at scripting. currently learning from building our server. if i can do it ill let you know

thanks man !

just looked off a couple of scripts and it just seems like a simple thing to add to the server.lua
I will test it and come right back to you

alright! figured out how to do it and again it was something simple to do and took me an hour lol

cool!

1 Like

tks man that awesome !

your welcome

Is there a way this can only be accessible to staff… Like though TXadmin staff?

yes, in the config.lua change >
restricCommand = true
– Setting this to false will allow anyone in the server to use the command.
– If you set it to true you will need to add a ace perm to allow people to use it.
– Such as add_ace [GROUP] command.[commandName] allow

so if you wanna restrict to admins you would do in your server.cfg (where ever you put your perms)
add_ace group.admin command.dvall

Is it possible that it can be written to where it can delete a vehicle that’s not set as a personal vehicle?
For example, if a server is hosting a car meet, the car set as a personal vehicle should not get deleted, while non-personal vehicles that have been spawned but not set as one via vMenu can be deleted.

This is a thing that worked on RSM before.

i never seen anything like that but will take into concideration. not sure how its done and dont think im capable of doing so, sorry

Thank you!

your welcome :grin:

Very helpful!

1 Like