coloured name for police
#1

I want to make that who is police , his name (tag) gets blue. Anyone can help me?
Reply
#2

That depends how your script is made, is it a gf edit? How did you make your teams? (:
Reply
#3

Im using LA-RP gm and i want that when a player joins police , his tag gets blue.
Reply
#4

https://sampwiki.blast.hk/wiki/SetPlayerColor
Reply
#5

if(gTeam[playerid] == Team)
{
SetPlayerColor(playerid,color);
}


put that under onplayerspawn
Reply
#6

Which will result of an icon on the map..
Reply
#7

Quote:
Originally Posted by ʂylaɾ
Which will result of an icon on the map..
You can learn about Alpha values (transparency) there

https://sampwiki.blast.hk/wiki/Colors_List
Reply
#8

I made that but an icon appears on the map for every officer . How can i remove the icon on the map?
Reply
#9

Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by ʂylaɾ
Which will result of an icon on the map..
You can learn about Alpha values (transparency) there

https://sampwiki.blast.hk/wiki/Colors_List
Reply
#10

I want that when police members go on duty (/duty) his name appears blue and if they go off duty , their name return white.

This is the code.



Код:
public SetPlayerToTeamColor(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
		if (PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
		SetPlayerColor(playerid,TEAM_HIT_COLOR);
		if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
		SetPlayerColor(playerid,0x0000FF00);
	}
}

Код:
	if(strcmp(cmd, "/duty", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
			{
				if (PlayerToPoint(3, playerid,257.7949,186.4360,1008.1719) || PlayerToPoint(10,playerid,233.3605,123.5655,1003.2188) || PlayerInfo[playerid][pLocal] != 255)
				{
					if(OnDuty[playerid]==0)
			    {
			      if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			      {
				  		format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
						}
						else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			      {
				  		format(string, sizeof(string), "* Agent %s took a Badge and a Gun from his locker.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 24, 2500);
						SafeGivePlayerWeapon(playerid, 3, 0);
						SafeGivePlayerWeapon(playerid, 29, 2500);
						SafeGivePlayerWeapon(playerid, 31, 2500);
						SetPlayerToTeamColor(playerid);
						SetPlayerArmour(playerid, 100);
	 					SetPlayerHealth(playerid, 100);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					  if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
					  {
							format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
						}
						else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
						{
						  format(string, sizeof(string), "* Agent %s places his Badge and Gun in his locker.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerArmour(playerid, 0);
						SafeGivePlayerWeapon(playerid, 41, 500);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "  You are not in a locker room !");
					return 1;
				}
			}
any help ? Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)