13.07.2018, 19:09
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);
}
}
}
Not tested.