SA-MP Forums Archive
Disable playermarkers for oposite team - 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: Disable playermarkers for oposite team (/showthread.php?tid=279645)



Disable playermarkers for oposite team - Wesley221 - 28.08.2011

Im trying to disable the playermarkers from the oposite team, but i cant get it working.

pawn Code:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if( gTeam[playerid] != gTeam[i] )
    {
        SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFFFF );
        return 1;
    }
}
I have this under OnPlayerSpawn, and when you spawn, the oposite team is still visible.
Anyone know what im doing wrong?


Re: Disable playermarkers for oposite team - iMonk3y - 28.08.2011

The last two chars are for the alphavalue. "If you use FF there it will be displayed without transparency and if you put it to 00 it will be invisible."


Re: Disable playermarkers for oposite team - Pinguinn - 28.08.2011

pawn Code:
0xFFFFFF00



Re: Disable playermarkers for oposite team - Wesley221 - 28.08.2011

I know that, but the colour didnt change neither, so that wasnt the problem. Also i made this on my laptop, because the script is on my pc. (Yes their both the same)


Re: Disable playermarkers for oposite team - AndreT - 28.08.2011

That must be caused by the return in your loop! In your case anything isn't necessary there. Although you could do it like this:
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(!IsPlayerConnected(i) || gTeam[i] == gTeam[playerid]) continue;
    SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
}