03.12.2010, 19:32
Hey, any reason why this TD doesn't update?
And I got it showing at OnPlayerConnect. But it only shows as Null.
pawn Код:
hp = TextDrawCreate(297.000000, 433.000000, "Health Level: Null");
TextDrawBackgroundColor(hp, 255);
TextDrawFont(hp, 1);
TextDrawLetterSize(hp, 0.509999, 1.300000);
TextDrawColor(hp, -1);
TextDrawSetOutline(hp, 0);
TextDrawSetProportional(hp, 1);
TextDrawSetShadow(hp, 1);
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:health,hstring[30];
GetPlayerHealth(playerid,health);
format(hstring,sizeof(hstring),"Health Level: %s",health);
TextDrawSetString(hp, hstring);
TextDrawShowForPlayer(playerid, hp);
return 1;
}
pawn Код:
new Text:hp;