SA-MP Forums Archive
ShowPlayerMarker - 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: ShowPlayerMarker (/showthread.php?tid=330763)



ShowPlayerMarker - berz - 02.04.2012

Hey. Im using mask system on my server when someone buys mask in 24/7 other players can't see their name, is is possible to make when they use mask to make him invisible on map? using ShowPlayerMarker somehow? Thanks.


Re: ShowPlayerMarker - Jonny5 - 02.04.2012

yes you need to loop threw all the players on the server and use

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer

make the color transparent by setting the alpha to 00
0xFFFFFF00


Re: ShowPlayerMarker - berz - 02.04.2012

Could u help me with the code? Since im not very good scripter

this is pawn code i use for mask system

pawn Код:
if(strcmp(cmd, "/maskon", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMask] == 0)
            {
                 SendClientMessage(playerid, COLOR_GRAD1, "   You don't have a mask");
                 return 1;
            }
            if(PlayerInfo[playerid][pLevel] < 5)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "  You are not able to use it.");
                return 1;
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 1;
            SendClientMessage(playerid, COLOR_WHITE, "   You have put your mask on [/maskoff to put it away].");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s puts a mask on.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }
   
    if(strcmp(cmd, "/maskoff", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMask] == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You don't have a mask");
                return 1;
            }
            if(PlayerInfo[playerid][pLevel] < 5)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not able to use it.");
                return 1;
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 1);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 0;
            SendClientMessage(playerid, COLOR_WHITE, "You have put your mask off [/maskon to put it on].");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s puts a mask away.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }



Re: ShowPlayerMarker - blank. - 02.04.2012

Код:
	for(new i = 0;i<MAX_PLAYERS;i++)
		{
		SetPlayerMarkerForPlayer(playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ) );
		}