IsmaelRD Posted May 22 Share Posted May 22 (edited) I would like that when the vehicle bought at the dealer explodes, it returns to the garage, I don't want it to disappear since the fact that the vehicle does not explode is not fully functional. I would really appreciate the help and if it is not too much, ask for a script that grabs the character by putting it as a command /load id Edited May 22 by Vinyard Link to comment
Doongogar Posted May 22 Share Posted May 22 you could use the onElementDestroy event to check if the destroyed element is a car and if it has an owner, if so, run the event to save the vehicle that probably already has it in the dealership mod Link to comment
IsmaelRD Posted May 25 Author Share Posted May 25 El 22/5/2023 a las 14:15, Doongogar dijo: podrías usar el evento onElementDestroy para comprobar si el elemento destruido es un coche y si tiene un propietario, si es así, ejecuta el evento para salvar el vehículo que probablemente ya lo tiene en el mod del concesionario but I have no idea how to do it I don't know how to script Link to comment
Prever77 Posted May 28 Share Posted May 28 Everything you need is isVehicleBlown and DestroyElement and maybe few lines of code that moves vehicle to some sort of garage. Idk maybe something like this if isVehicleBlown(vehicle) == true then DestroyElement(vehicle) dbExec(pass,"UPDATE garage SET statusIn=1 or true") else return end end I didn't tested it. But it would be something like this if your cars are stored in MySQL database. You can close it in Timer for example or event Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now