25.03.2018, 16:05
PHP код:
forward UpdateNametag();
public UpdateNametag()
{
foreach(new i : Player)
{
if(IsPlayerConnected(i))
{
new nametag[128], playername[MAX_PLAYER_NAME], Float:armour, Float:hp;
GetPlayerArmour(i, armour);
GetPlayerHealth(i, hp);
GetPlayerName(i, playername, sizeof(playername));
if(armour > 1.0)
{
format(nametag, sizeof(nametag), "{%06x}%s {FFFFFF}(%i)\n{FFFFFF}%f\n{FF0000}%f", GetPlayerColor(i) >>> 8, playername, i, floatround(armour, floatround_floor), floatround(hp, floatround_floor));
}
else
{
format(nametag, sizeof(nametag), "{%06x}%s {FFFFFF}(%i)\n{FF0000}%f", GetPlayerColor(i) >>> 8, playername, i, floatround(hp, floatround_floor));
}
UpdateDynamic3DTextLabelText(cNametag[i], 0xFFFFFFFF, nametag);
}
}
}