SA-MP Forums Archive
Show name tag for team - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Show name tag for team (/showthread.php?tid=104158)



Show name tag for team - Gappy - 23.10.2009

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.

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;
}
Is there any other way of doing it?


Re: Show name tag for team - Adamrcook - 23.10.2009

Not really, do it that way or just ShowNameTags(0/1); them On or Off permanently.