Infinite vehicle health as 0
#1

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).
Reply
#2

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.
Reply
#3

Does it work against a rocket launcher or any explosion?
Reply
#4

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 .
Reply
#5

Thank you.
Reply
#6

Np mate
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)