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



PlayerMarkers - Oh - 18.12.2011

Is it possible to make something where gTeam Survivor cannot see gTeam Animal and gTeam Animal can see gTeam Survivor?

+rep for whoever can help me.


Re: PlayerMarkers - jamesbond007 - 18.12.2011

damn just look down few topics it was discussed already !!!

https://sampforum.blast.hk/showthread.php?tid=304340

lrn2search


Re: PlayerMarkers - Oh - 18.12.2011

I already read that, it has nothing to do with what I'm speaking of.

I don't have markers for either gTeams.

Basically I don't want Survivors to see Survivors markers, I just want Animals to see Survivors.


Re: PlayerMarkers - suhrab_mujeeb - 18.12.2011

Use a loop with this: SetPlayerMarkerForPlayer
Here is an example:
pawn Код:
stock HideTeamMarkers(playerid)
{
    for(new x; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
    {
        if(gTeam[x] == gTeam[playerid]) // Change this part the way you like
        {
            SetPlayerMarkerForPlayer(playerid, x, (GetPlayerColor(x) & 0xFFFFFF00));
            SetPlayerMarkerForPlayer(x, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
        }
    }
    return 1;
}
^ Code by Lorenc_. Use it under OnPlayerSpawn then.