26.03.2010, 16:09
I want to make that who is police , his name (tag) gets blue. Anyone can help me?
Originally Posted by ʂylaɾ
Which will result of an icon on the map..
|
Originally Posted by MadeMan
Quote:
https://sampwiki.blast.hk/wiki/Colors_List |
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; } }