GetVehicleHealth? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetVehicleHealth? (
/showthread.php?tid=249419)
GetVehicleHealth? -
park4bmx - 18.04.2011
ok so i got this
pawn Код:
new Float:VHealth; GetVehicleHealth(vehicleid,VHealth);
new VeheStr[80]; format(VeheStr,sizeof(VeheStr),"%d",VHealth);
and then it comes up with like
Vehicle Health: 15488648 a large number so how can i fix that
Re: GetVehicleHealth? -
Alby Fire - 18.04.2011
pawn Код:
new
Float:VHealth,
VeheStr[80];
GetVehicleHealth(vehicleid,VHealth);
format(VeheStr,sizeof(VeheStr),"%f",VHealth);
You defined the vehicle's health as a Float and you formatted it as an integer, ^ this is the right one.
Re: GetVehicleHealth? -
park4bmx - 18.04.2011
Quote:
Originally Posted by Alby Fire
pawn Код:
new Float:VHealth; GetVehicleHealth(vehicleid,VHealth); new VeheStr[80]; format(VeheStr,sizeof(VeheStr),"%f",VHealth);
You defined the vehicle's health as a Float and you formatted it as an integer, ^ this is the right one.
|
Omg yes forgot that Thanks