20.07.2012, 17:51
Quote:
wouldn't be better just repair the vehicle each time is damaged? do this, or make a simple settimer.
pawn Код:
|
I do use RepairVehicle for the visual repair, but it sets the vehicle health to 1000, not enough to survive explosions. Hence my reason for using SetVehicleHealth straight afterwards.
I am actually repairing/setting health of vehicles using both the OnVehicleDamageStatusUpdate callback and a looping timer. The callback gives instant repair, but no protection when a car flips over and settles on its roof. The looping timer ensures flipped cars will not explode, giving players time to use any of the escape methods available on the server.
I must say that your feedback made me smile because I am usually a bit of a coding-loner, so knowing that I am doing it in a generally acceptable way is good to know!
Thanks again hansen111 for your advice and clarification on how explosions impact vehicles.