SA-MP Forums Archive
Infinite vehicle health as 0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Infinite vehicle health as 0 (/showthread.php?tid=413513)



Infinite vehicle health as 0 - IllidanS4 - 05.02.2013

When I set the vehicle health to infinity using this script:
pawn Code:
SetVehicleHealth(vehicleid, Float:0x7F800000);
It appears working to the driving player, but the other players see the vehicle health at 0 and burning, then exploding.
If player health is set to infinity, the other players also see the health bar empty (but this is actually useful).


Re: Infinite vehicle health as 0 - Killa[DGZ] - 05.02.2013

Then don't use that code, using a timer to set the vehicle health to 100000 every second is fine and will perform in the same way.

You can also use 'OnVehicleDamageStatusUpdate(vehicleid, playerid)' to achieve the same thing without a timer.


Re: Infinite vehicle health as 0 - IllidanS4 - 05.02.2013

Does it work against a rocket launcher or any explosion?


Re: Infinite vehicle health as 0 - Killa[DGZ] - 05.02.2013

I believe it does yes..

SetVehicleHealth(GetPlayerVehicleID(i),100000);

I have that exact line within a 1000ms timed function, I've even had cars explode right beside me and still been fine .


Re: Infinite vehicle health as 0 - IllidanS4 - 05.02.2013

Thank you.


Re: Infinite vehicle health as 0 - Mafioso97 - 05.02.2013

Np mate


Re: Infinite vehicle health as 0 - Lorenc_ - 06.02.2013

I reported the same thing year ago thus I suggested ToggleVehicleInvurenable for 0.3x (but meh)