09.01.2011, 22:22
Well? Im empty xD Here is the code:
pawn Code:
#include <a_samp>
new Text:HealthTD;
public OnFilterScriptInit()
{
HealthTD = TextDrawCreate(251.000000, 434.000000, "-");
TextDrawBackgroundColor(HealthTD, 255);
TextDrawFont(HealthTD, 1);
TextDrawLetterSize(HealthTD, 0.500000, 1.000000);
TextDrawColor(HealthTD, -1);
TextDrawSetOutline(HealthTD, 0);
TextDrawSetProportional(HealthTD, 1);
TextDrawSetShadow(HealthTD, 1);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/show", cmdtext, true, 10) == 0)
{
TextDrawShowForPlayer(playerid,HealthTD);
return 1;
}
if (strcmp("/hide", cmdtext, true, 10) == 0)
{
TextDrawHideForPlayer(playerid,HealthTD);
return 1;
}
return 0;
}
public OnPlayerUpdate(playerid)
{
new string[128];
new Float:health;
GetPlayerHealth(playerid, health);
format(string, sizeof(string), "%f", health);
TextDrawSetString(HealthTD, string);
return 1;
}