GetVehicleHealth always return 1148??? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetVehicleHealth always return 1148??? (
/showthread.php?tid=526255)
GetVehicleHealth always return 1148??? -
BlackM - 16.07.2014
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?
Re: GetVehicleHealth always return 1148??? -
IstuntmanI - 16.07.2014
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.
Re: GetVehicleHealth always return 1148??? -
BlackM - 16.07.2014
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