This script allows you to add a new element of realism to your server by adding the possibility of losing wheels.
Requirements to trigger the loss of wheels:
Make a jump that lasts more than 1 second (configurable in the config.lua)
Make a collision with a certain speed (configurable in the config.lua)
The wheels are removable to be put back on the original vehicle.
Integration for other script
A trigger is available to allow your mechanic script to repair the damaged vehicle.
TriggerEvent("az_wheel:fixvehicle")
Limitation
The limitations of GTA make that the motorcycle wheels are not detachable, so they are immune. I also limited the wheels for boats, planes and helicopters. The off-road wheels allow to override the fact of losing a wheel via height but not via collisions.
Known bugs:
Vehicles can sometimes bug and go under the map (rare but it can happen)
Hello, this is a bug that can happen, I do not know exactly the cause, I am currently researching and I will update if I find the solution,
Sincerely, Azeroth