Here is a delete vehicle script I made with thanks to Mr.Scammer!
This script is standalone and does not require EssentialMode or any other gamemode, it is standalone. If people want an EssentialMode version I can make one.
Usage: Enter a vehicle or stand next to one and type: /dv.
Download
wk_delveh-1.1.0.zip (1.8 KB)
Click here to download [1.0.5]
Click here to download [1.0.4]
Click here to download [1.0.3]
Click here to download [1.0.2]
Installation
Download the .zip file above and place the included folder into your server’s resource folder.
Once the folder is in go to the root directory of your server where FXServer.exe is located, open your server config file (depending on what you named it, typically server.cfg), add ensure wk_delveh
to your resource start section.
Changelog
1.1.0
- Converted __resource.lua to fxmanifest.lua
- Removed chat message command, it nows uses
RegisterCommand
which triggers thewk: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.0.5
- Added a check to make sure that the vehicle has actually been deleted - a notification will display if not
1.0.4
- Updated commands, you can now type /delveh as well as /dv
- Re-wrote the system for deleting vehicles outside of them
- You can now delete planes, helicopters and boats when you stand outside
- Fixed notification saying vehicle was deleted when in the passenger seat
- You can now delete blown up vehicles, as well as trailers
1.0.3
- You can now only delete vehicles when in the drivers seat of a vehicle
- You can now delete a vehicle when standing next to it
- Due to a limitation, you cannot delete planes, helicopters or boats without being in them
1.0.2
- Updated the script so you can now delete game spawned cars!
1.0.1
- Re-wrote most of client.lua to fix the issue with the command not working (?)
1.0.0
- Initial release
Credits
- Me, writing the script
- Mr.Scammer, for helping and a few code snippets
- Zanax, for helping test the GetRandomVehicleInSphere function.
- Konijima