Posts: 1,276
Threads: 6
Joined: Aug 2014
Performance is amazing when you loop with a timer with no reason.
not that it matters anyway
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 ?
Posts: 2,593
Threads: 34
Joined: Dec 2007
Nope you need create own ShowPlayerNameTagForPlayer function with Create3dTextLabel
Posts: 2,593
Threads: 34
Joined: Dec 2007
I know that i need create, but i dont have any clue how to do it simply ;d