23.10.2009, 05:35
This is what I've been using, but it's a tad buggy as sometimes you can still see the other teams nametag
I have it update tags whenever someone spawns.
Is there any other way of doing it?
I have it update tags whenever someone spawns.
pawn Код:
forward TagsUpdate(playerid);
public TagsUpdate(playerid)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[playerid] == gTeam[i] || SeeTags[playerid] == true)
{
ShowPlayerNameTagForPlayer(playerid, i, 1);
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
else
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
}
return 1;
}