Setting String Depending On Float (I think?)
#1

Okay, firstly thanks for even looking at his to help.

Okay I could do it like this

pawn Код:
new Float:Health;
    GetPlayerHealth(playerid,Health);
    if(Health == 99)
    {
        TextDrawSetString(HealthBar[playerid],"...................................................................................................");
      return 1;
    }
But that means I need to do that 100 times, which would kind of blag to write out, so could I create a string, then the amount of health = the amount of dots.

pawn Код:
new Float:Health, string[128];
    GetPlayerHealth(playerid,Health);
    //format the string to health = dots
    TextDrawSetString(HealthBar[playerid],string);
Thanks in advance.
Reply


Messages In This Thread
Setting String Depending On Float (I think?) - by NeRoSiS - 07.06.2009, 10:25
Re: Setting String Depending On Float (I think?) - by Weirdosport - 07.06.2009, 10:33
Re: Setting String Depending On Float (I think?) - by yom - 07.06.2009, 10:36
Re: Setting String Depending On Float (I think?) - by Weirdosport - 07.06.2009, 10:39
Re: Setting String Depending On Float (I think?) - by NeRoSiS - 07.06.2009, 11:35
Re: Setting String Depending On Float (I think?) - by NeRoSiS - 07.06.2009, 11:49

Forum Jump:


Users browsing this thread: 1 Guest(s)