Removing float zeroes on a string
#1

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

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

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

when you use mine what does it show?

and when i put 0.2 it shows with two zeros
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)