PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new str[4];
new Float:tPos[3];
GetPlayerPos(playerid, tPos[0], tPos[1], tPos[2]);
format(str, 4, "%.1f", amount);
new Text3D:hitbar = Create3DTextLabel(str, 0xFF0000FF, tPos[0], tPos[1], tPos[2] + 0.6, 30.0, 0);
SetTimerEx("UpdateHitBar", 66, 0, "iffffii", playerid, amount, tPos[0], tPos[1], tPos[2] + 0.8, 16, 0xFF0000FF);
SetPVarInt(playerid, "hidbar_HitBar", _:hitbar + 1);
return 1;
}