I'll need some help with format strings - 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: I'll need some help with format strings (
/showthread.php?tid=97323)
I'll need some help with format strings -
Goobiiify - 13.09.2009
Hello, I've been doing/attempting to make when you entering a vehicle, it will give you the current health of it.
But it does just view 0.000000...
here is my piece of code.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:Vhealth, string[128];
GetVehicleHealth(playerid, Vhealth);
format(string, sizeof(string), "You entered a Vehicle with Health: %f", Vhealth);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
//Goobii
Re: I'll need some help with format strings -
Goobiiify - 13.09.2009
Quote:
Originally Posted by Y_Leѕѕ
Quote:
Originally Posted by Goobii (Mightly Nordic)
pawn Код:
GetVehicleHealth(playerid, Vhealth);
|
Are you a vehicle? No, you are a person - how can you get the vehicle health of a person?
|
Damn, a big mistake of me, thanks a lot, HAHA
Problem solved!
Re: I'll need some help with format strings -
Ov3rl0rd - 13.09.2009
Nevermind someone beat me to it