29.10.2010, 11:53
EXAMPLE
up under #include <a_samp>
OnPlayerConnect
OnPlayerDisconnect
Timer under ongamemodeinit
The function
not tested
up under #include <a_samp>
pawn Код:
new Text3D:TestHp[MAX_PLAYERS];
pawn Код:
TestHp[playerid] = Create3DTextLabel(" ",COLOR,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(TestHp[playerid], playerid, 0.0, 0.0, 0.9);
pawn Код:
Delete3DTextLabel(TestHp[playerid]);
Timer under ongamemodeinit
pawn Код:
SetTimer("UpdateHp",100,1);
pawn Код:
forward UpdateHp();
public UpdateHp()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:Health;
new HealthS[15];
GetPlayerHealth(playerid,Health);
format(HealthS, 15, "HP:%d",floatround(Health));
Update3DTextLabelText(TestHp[playerid],COLOR,HealthS);
}
}