Jump to content

Respawn destroyed vehicle to garage

Recommended Posts

Posted (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 by Vinyard
Link to comment
  • Vinyard changed the title to Respawn destroyed vehicle to garage
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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...