GetVehicleHealth always return 1148???
#1

Hello, I have tried using GetVehicleHealth in a script I have made and noticed that it is not working as it should. So I formated a string to show the value of the variable that is in the second parameter of GetVehicleHealth and its ALWAYS 1148, with all vehicles! Even though the variable is declared as a Float it returns the integer 1148 all the time. Can anyone help me out plz?
Reply
#2

pawn Код:
new Float:lfVehicleHealth;
GetVehicleHealth( GetPlayerVehicleID( playerid ), lfVehicleHealth );
printf( "%f", lfVehicleHealth );
this is the correct method, it is a float, and has to be shown as a float.
Reply
#3

Okay, but still, this may just make my debugging a little more accurate but still the script is not working as it should. No vehicle should return that health value, especially if /dl shows that their health is infact 0.0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)