Repair All Vehicles on Map

UrbanSkaters

Valued Member!
Hi. I'm using a script that repairs a vehicle for you, but I've noticed that if I log off and log on again after a few hours or so the vehicle is starting to break down again, i.e yellow and orrange or sometimes even red status.

I was wondering, is there a script that will simply repair all vehicles on the map every log in or at a set interval? Thank you.
 
I do mine just before a server restart by updating the mySQL database. Basically set damage=0 in the instance_vehicle table.

I also set parts='[]', this is the field that holds the individual parts that are damaged. I find if you miss this the vehicle repairs but the glass is often still broken.

You can also fuel them up here by fuel=1
Code:
UPDATE instance_vehicle SET damage=0, parts='[]' WHERE damage>0
 
Thank Axeman, I'm assuming that this would explain why everything looks green when I log out, but orange or yellow when I log back in ? Thanks for the code snippet!
 
Back
Top