Issues with strings
#1

Hey guys, I'm updating my stranger system, and I ran into a bit of a blockade. How would I go above removing part of the string while inserting another part? What I have hear constantly inserts the information, but doesn't remove the old HP and such.

pawn Код:
if(StrangerID[playerid] > 0)
    {
        new Float:arm, Float:hps, healthstring[64];
        GetPlayerHealth(playerid, hps);
        GetPlayerArmour(playerid, arm);
        new hpe = floatround(hps);
        new arme = floatround(arm);
        if(arm != 0)
        {
            format(healthstring, sizeof(healthstring), "\nHP: %d | Armour: %d", hpe, arme);
        }
        else
        {
            format(healthstring, sizeof(healthstring), "\nHealth: %d", hpe);
        }
        format(PlayerInfo[playerid][HealthString], 64, healthstring);
        strcat(PlayerInfo[playerid][StrangerMask], healthstring, 256);
        Update3DTextLabelText(StrangerTag[playerid], WHITE, PlayerInfo[playerid][StrangerMask]);
    }
Reply


Messages In This Thread
Issues with strings - by nmader - 21.06.2014, 01:35
Re: Issues with strings - by Ciandlah - 21.06.2014, 03:02
Re: Issues with strings - by Threshold - 21.06.2014, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)