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



Player Marker - Iron3man - 15.12.2013

I want that, a player marker on map can only see his team not anyone else
I mean a player can see only the marker of his team mate not of his enemy.
Pls tell me how to do that


Re: Player Marker - newbie scripter - 15.12.2013

pawn Код:
public SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == teamVariable1)
    {
        SetPlayerColor(playerid, teamVariable1color);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(gTeam[i] == teamVariable2)
            {
                SetPlayerMarkerForPlayer(i , playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
            }
        }
    }
    if(gTeam[playerid] == teamVariable2)
    {
        SetPlayerColor(playerid, teamVariable2 color);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(gTeam[i] == teamVariable1)
            {
                SetPlayerMarkerForPlayer(i , playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
            }
        }
    }
    return 1;
}
i made this but didn't test