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 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.
- Converted __resource.lua to fxmanifest.lua
- Removed chat message command, it nows uses
RegisterCommandwhich triggers the
- Added a chat suggestion for the
- 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
- Added a check to make sure that the vehicle has actually been deleted - a notification will display if not
- 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
- 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
- Updated the script so you can now delete game spawned cars!
- Re-wrote most of client.lua to fix the issue with the command not working (?)
- Initial release
- Me, writing the script
- Mr.Scammer, for helping and a few code snippets
- Zanax, for helping test the GetRandomVehicleInSphere function.