How to make Hp & Armour show 3d
#1

Script I am Show but Hp not show Armour 3dtext help please

Quote:

//------------[Showhp]---------
new Text3D:ShowHp[MAX_PLAYERS];
new Text3D:ShowAr[MAX_PLAYERS];

ShowHp[playerid] = Create3DTextLabel(" ",0xFFFFFFAA,40.0,20.0,-40.0,10.0,0,0);
Attach3DTextLabelToPlayer(ShowHp[playerid], playerid, 0.5, 0.2, -0.6);
ShowAr[playerid] = Create3DTextLabel(" ",0xFFFFFFAA,0.0,0.0,-20.0,10.0,0,0);
Attach3DTextLabelToPlayer(ShowAr[playerid], playerid, 0.0, 0.0, -0.0);

Delete3DTextLabel(ShowHp[playerid]);
Delete3DTextLabel(ShowAr[playerid]);

forward UpdateHp();
public UpdateHp()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:Health;
new HealthS[15];
GetPlayerHealth(playerid,Health);
format(HealthS, 15, "аЕЧНґ :%d",floatround(Health));
Update3DTextLabelText(ShowHp[playerid],0xFFFFFFAA,HealthS);
}
}

forward UpdateAr();
public UpdateAr()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:Armour;
new ArmourS[15];
GetPlayerArmour(playerid,Armour);
format(ArmourS, 15, "аЎГТР : %d",floatround(Armour));
Update3DTextLabelText(ShowAr[playerid],0xFFFFFFAA,ArmourS);
}
}

Script Not Show Armour
Reply
#2

I Want Show Hp & Armour but Show Health Only
Reply
#3

help please
Reply
#4

help please ....
Reply
#5

please edit
Reply
#6

Код:
//------------[Showhp]---------
new Text3D:ShowHp[MAX_PLAYERS];
new Text3D:ShowAr[MAX_PLAYERS];

ShowHp[playerid] = Create3DTextLabel(" ",0xFFFFFFAA,40.0,20.0,-40.0,10.0,0,0);
Attach3DTextLabelToPlayer(ShowHp[playerid], playerid, 0.5, 0.2, -0.6);
ShowAr[playerid] = Create3DTextLabel(" ",0xFFFFFFAA,0.0,0.0,-20.0,10.0,0,0);
Attach3DTextLabelToPlayer(ShowAr[playerid], playerid, 0.0, 0.0, -0.0);

SetTimer("UpdateHpAr", 500, true);

forward UpdateHpAr();
public UpdateHpAr()
{
	for(new p; p < MAX_PLAYERS; p++)
	{
		new 
			string[15],
			Float:Armour,
			Float:Health;

		GetPlayerHealth(playerid,Health);
		GetPlayerArmour(playerid,Armour);
		format(string, sizeof(string), "аЕЧНґ :%d",floatround(Health));
		Update3DTextLabelText(ShowHp[p],0xFFFFFFAA,string);
		format(string, sizeof(string), "аЎГТР : %d",floatround(Armour));
		Update3DTextLabelText(ShowAr[p],0xFFFFFFAA,string);

	}
}
Reply
#7

Thanks. for edit
Reply
#8

Why Hp & Amour Not update because ?
Reply
#9

put SetTimer("UpdateHpAr", 500, true); into OnGameModeInit
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)