Disable playermarkers for oposite team
#1

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?
Reply
#2

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."
Reply
#3

pawn Code:
0xFFFFFF00
Reply
#4

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)
Reply
#5

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);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)