How do i automatically update players health?
#3

You'd have to create a function and put that function on a timer, for example:


pawn Code:
forward DrawNewHealth(playerid);
public DrawNewHealth(playerid)
{
    new Float:pHealth, string[128];
    GetPlayerHealth(playerid, pHealth);
    format(string, sizeof(string), "Health %f", pHealth);
    TextDrawSetString(TEXTDRAWNAME, string) // this is where you would update the actual textdraw
    return 1;
}
Then set that on a timer whenever you show the textdraw, maybe OnGameModeInit?
Reply


Messages In This Thread
How do i automatically update players health? - by Typical_Cat - 26.04.2010, 23:05
Re: How do i automatically update players health? - by _Vortex - 26.04.2010, 23:10
Re: How do i automatically update players health? - by dcmd_crash - 26.04.2010, 23:13

Forum Jump:


Users browsing this thread: 1 Guest(s)