SA-MP Forums Archive
i set command to change color, but I dont want it to be seen on the mapicon - 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: i set command to change color, but I dont want it to be seen on the mapicon (/showthread.php?tid=550259)



i set command to change color, but I dont want it to be seen on the mapicon - davidstyle1125 - 11.12.2014

Hello, I made a VIP color for the VIP members..
now.. when they tog the color everyone can see them on the minimap.. but I just want
that their color will be seen above their names and in TAB.. without seeing it on the MiniMap..
How to?

Код:
CMD:vipcolor(playerid, params[]) {
    if(PlayerInfo[playerid][pDonator] >= 1)
	{
	    if(GetPVarInt(playerid, "EventToken") == 1)
		{
			SendClientMessage(playerid, COLOR_WHITE, "You can't use this command while in an event.");
	    }
		if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pFaction] == 6 || PlayerInfo[playerid][pLeader] == 6)
		{
			SendClientMessage(playerid, COLOR_WHITE, "You can't use this command while in a Faction.");
			return 1;
	    }
		if(PlayerInfo[playerid][pVIPDuty])
		{
			PlayerInfo[playerid][pVIPDuty] = 0;
			SetPlayerColor(playerid, 0xFFFFFFAA);
			SendClientMessage(playerid, COLOR_WHITE, "You have hidden your VIP color.");
		}
		else
		{
			PlayerInfo[playerid][pVIPDuty] = 1;
			SetPlayerColor(playerid, 0xA2E3E8AA);
			SendClientMessage(playerid, COLOR_WHITE, "You have shown your VIP color.");
		}
	}
	return 1;
}


You may see on the picture the light blue color..
How to remove it from the map? I just want to see the player's name colored and over "TAB".. I don't want it to be shown in the mini map..


Re: i set command to change color, but I dont want it to be seen on the mapicon - Clad - 11.12.2014

Under OnGameModeInIt add this
pawn Код:
ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);



Re: i set command to change color, but I dont want it to be seen on the mapicon - davidstyle1125 - 12.12.2014

But, if I Disable that it won't show it at all right?
But there's commands like:
/backup which needs to use the player's marker on mini map.. so they cops will be able to locate the backup call.


Re: i set command to change color, but I dont want it to be seen on the mapicon - Clad - 12.12.2014

It will work for cops since it will load only once.


Re: i set command to change color, but I dont want it to be seen on the mapicon - davidstyle1125 - 12.12.2014

But its not working for cops..
I can't see the faction colors who used command /backup in mini map..?


Re: i set command to change color, but I dont want it to be seen on the mapicon - davidstyle1125 - 13.12.2014

Can you help me? I want to make this color not seen on map.. Player_Markers... makes all the markers off..
i want only for /vipcolor


Re: i set command to change color, but I dont want it to be seen on the mapicon - FullCircle - 13.12.2014

You can use transparency: Color List


Re: i set command to change color, but I dont want it to be seen on the mapicon - Mic_H - 14.12.2014

PHP код:
CMD:vipcolor(playeridparams[]) {
    if(
PlayerInfo[playerid][pDonator] >= 1)
    {
        if(
GetPVarInt(playerid"EventToken") == 1)
        {
            
SendClientMessage(playeridCOLOR_WHITE"You can't use this command while in an event.");
        }
        if(
IsACop(playerid) || PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == 6)
        {
            
SendClientMessage(playeridCOLOR_WHITE"You can't use this command while in a Faction.");
            return 
1;
        }
        if(
PlayerInfo[playerid][pVIPDuty])
        {
            
PlayerInfo[playerid][pVIPDuty] = 0;
            
SetPlayerColor(playerid0xFFFFFF00);//00=Fully Transparent. AKA Level 0 Visibility
            
SendClientMessage(playeridCOLOR_WHITE"You have hidden your VIP color.");
        }
        else
        {
            
PlayerInfo[playerid][pVIPDuty] = 1;
            
SetPlayerColor(playerid0xA2E3E8AA);//AA=Level 10 Visibility.
            
SendClientMessage(playeridCOLOR_WHITE"You have shown your VIP color.");
        }
    }
    return 
1;

Credits: FullCircle, I just put it in script.