Posts: 2,593
Threads: 34
Joined: Dec 2007
Quote:
Originally Posted by ItsRobinson
PHP код:
forward UpdateNametag();
public UpdateNametag()
{
foreach(new i : Player)
{
if(IsPlayerConnected(i))
{
new nametag[128], playername[MAX_PLAYER_NAME], Float:armour, Float:health;
GetPlayerArmour(i, armour);
GetPlayerHealth(i, health);
GetPlayerName(i, playername, sizeof(playername));
format(nametag, sizeof(nametag), "{%06x}%s {FFFFFF}(%i)\n{FF8282}HP: %f{FFFFFF} - AR: %f", GetPlayerColor(i) >>> 8, playername, i, floatround(health, floatround_round), floatround(armour, floatround_round));
UpdateDynamic3DTextLabelText(cNametag[i], 0xFFFFFFFF, nametag);
}
}
}
I think that will work, just replace the one from the guys script with the one above.
Not tested.
|
You dont need IsPlayerConnected part in foreach, and also i have question to all how to create
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer to this include with Create3dTextLabel ?