Float on Textdraws?
#1

i want to make the damage amount to be like 32.0 damage distance: 10 meters

...but i can't get it
pawn Код:
if(issuerid != INVALID_PLAYER_ID && weaponid != 0)
    {
        new Float: dauna;
        new string[456];
        if(DamageInfo[playerid] == 1)
        {
            format(string, sizeof(string), "~R~%0.3f damage primit - %0.3f", dauna, GetDistanceBetweenPlayers(playerid,issuerid));
            PlayerTextDrawSetString(playerid, DamageInfoTD[playerid], string);
            PlayerTextDrawShow(playerid, DamageInfoTD[playerid]);
            SetTimerEx("HideDamageInfo", 1500, false, "i", playerid);
        }
        if(DamageInfo[issuerid] == 1)
        {
            format(string, sizeof(string), "~G~%0.3f damage dat - %0.3f", dauna, GetDistanceBetweenPlayers(playerid,issuerid));
            PlayerTextDrawSetString(issuerid, DamageInfoTD[issuerid], string);

            PlayerTextDrawShow(issuerid, DamageInfoTD[issuerid]);

            SetTimerEx("HideDamageInfo", 1500, false, "i", issuerid);
        }
    }
Reply
#2

I don't understand, but if you want only 1 decimal value after the dot(.), make "%0.1f", and if you don't want it to be a float use floatround
Reply
#3

Thanks fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)