[Release] Delete Vehicle Script [v1.1.0] (Updated 2020)

(Fixed the script not working)

Can someone help me with this?How can I remove NPCs in specific place?

nice work

1 Like

Is there any (admin) script that deletes a number of vehicles?

Update 1.1.0

  • Converted __resource.lua to fxmanifest.lua
  • Removed chat message command, it nows uses RegisterCommand which triggers the wk:deleteVehicle event
  • Added a chat suggestion for the /dv command
  • Revised some of the deletion system to reduce redundant code
  • Added a timeout so if the vehicle canā€™t be deleted, it keeps trying until a it hits the limit or the vehicle has been deleted
  • Updated the ray trace natives, as well as using a capsule so now you donā€™t have to be facing a vehicle to delete it
1 Like

The issue of deleting solo sessioned cars is still being an issue. It fails after 5 attempts

What do you mean? I didnā€™t have any issues when I was testing it. Can you give me specifics?

Iā€™m not sure if thereā€™s any useful logs i can get you, we are running with onesync_distanceCullVehicles turned to true, and some vehicles are undeletable, it does say it tried 5 times but doesnā€™t work out.
However i have tried it with Vmenuā€™s delete vehicle option in the vehicle spawner and that seems to go through.

To me it feels like a onesync related issue with migration, i could be wrong.

Thanks for the info, Iā€™ll have a look tomorrow.

Does this only work for admins or all ?

Iā€™m looking for a script that a admin/owner/staff can do a mass dv, that deletes all vehicles? any help?

5 Likes

Everyone, but you can use ACE permissions to change it.

So for some reason we cant delet AI cars that are empty. It says failure to delete vehicle and it doesnt let us get in the vehicles to delete it.

Iā€™m trying to fix the problem with OneSync, but Iā€™m waiting for feedback on the test version to ensure it works. Why you cannot even get in the vehicles sounds like something else, this script doesnā€™t do that.

Im having the same problem, ever since i switched to OneSync thats been occuring way too oftenā€¦

how do we get the test version so I can give some feedback?

What about mass dv?

4 Likes

I put the file in and wrote start wk_delvey, but it doesnā€™t work. Please tell me how.

Thereā€™s a seperate resource that cleans up unoccupied/blown up vehicles. Youā€™d have to use that and set a timer.

Refresh, add it to server.cfg then start it