Код:
#include <a_samp>
#include <progress2>
new PlayerBar:Bar0[MAX_PLAYERS];
new ProgressTimer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Bar0[playerid] = CreatePlayerProgressBar(playerid, 552.000000, 67.000000, 55.500000, 1.200000, -16776961, 100.0000, 0);
return 1;
}
public OnPlayerSpawn(playerid)
{
ShowPlayerProgressBar(playerid, Bar0[playerid]);
ProgressTimer[playerid] = SetTimerEx("barSS", 100, true, "i", playerid);
return 1;
}
forward barSS(playerid);
public barSS(playerid)
{
new Float:hp;
hp = GetPlayerHealth(playerid, hp);
SetProgressBarValue(Bar0[playerid], hp);
}