I'll need some help with format strings
#1

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

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

Nevermind someone beat me to it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)