Removing float zeroes on a string

pawn Код:
new Float:hp, Float:ap,stringy[128];
    GetPlayerArmour(playerid, ap);
    GetPlayerHealth(playerid, hp);
    format(stringy, sizeof(stringy), "%s [%d]\nHP: %f | AP: %f",GetName(playerid),playerid,hp,ap);
    SetPlayerChatBubble(playerid, stringy, GetPlayerColor(playerid), 500.0, 1000);
Title ^ ^

I'm not sure nut maybe this :
PHP код:
format(stringysizeof(stringy), "%s [%d]\nHP: %0.6f | AP: %0.6f",GetName(playerid),playerid,hp,ap); 
or this one :
PHP код:
format(stringysizeof(stringy), "%s [%d]\nHP: %0.4f | AP: %0.4f",GetName(playerid),playerid,hp,ap); 

But I'm sure one of them is what you want
Is There Any +REP ?!

Both... didn't work.
EDIT: Oh wait, I've noticed some FAIL on my script.
BTW thanks for the help,here's your REP+.

when you use mine what does it show?

and when i put 0.2 it shows with two zeros

Forum Jump:

Users browsing this thread: 1 Guest(s)