21.06.2014, 01:35
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]);
}