SA-MP Forums Archive
Name Tag Question - 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)
+--- Thread: Name Tag Question (/showthread.php?tid=331639)



Name Tag Question - 4znlyfe - 05.04.2012

Hey Guys,

I was wondering, Is there a way i can do like this

[ADMIN]Playername
[Police]Chief 4znlyfe

*Each Rank Tag has it own color indicator(Red for Admin,Green for Police,etc)

Thanks


Re: Name Tag Question - blank. - 05.04.2012

You'll need to use SetPlayerName or make a 3D text on top of his head and hide his name tag.


Re: Name Tag Question - Cjgogo - 05.04.2012

pawn Код:
public OnPlayerSpawn(playerid)
{
   new pName[MAX_PLAYER_NAME];
   GetPlayerName(playerid,pName,sizeof(pName));
   new string[250];
   if(IsPlayerAdmin(playerid))
   {
      format(string,sizeof(string),"[ADMIN]%s",pName);
      SetPlayerName(playerid,string);
   }
   if(gTeam[playerid]==TEAM_COPS)
   {
       format(string,sizeof(string),"[Police]%s",pName);
       SetPlayerName(playerid,string);
   }
 return 1;
}
You can alternatively use switch,it's your choice.Adjust my code to your specs,and unfortunately I have no idea how to remove the tag ,maybe someone would edit my script,I gave you a basic idea.