only teammates visible on radar
#1

hi,

damn is that really that hard?
I just cant get it done!
I want it like only ur own team members are visible on the radar map.
Ive tried smth. like this but it didnt work:

pawn Код:
//OnPlayerSpawn

    for(new i; i < MAX_PLAYERS; i++)
    {
    if(gTeam[i] == TEAM_POLICE)
    {
    SetPlayerMarkerForPlayer(i , playerid, 0xFFFFFF00);
    }
    else if(gTeam[i] == TEAM_TERRORISTS)
    {
    SetPlayerMarkerForPlayer(i ,playerid, 0xFFFFFF00);
    }
    }
would be happy about some help

regards.
Reply
#2

what this do ingame?
Reply
#3

this code shall make ur enemies on the minimap invisible.
there are 2 teams.
If the player belongs to team1 he only shall be able to see his own team members from team1 and not the players from the adverse team team2.
The same counts for team2...

i hope u understand now
Reply
#4

nono i mean what this code you make do in game for debuging
Reply
#5

Код:
0xFFFFFF00
0xRRGGBBAA
Look at the alpha (AA) part. It ranges from 00 (completely invisible) to FF (completely visible).
Reply
#6

sry i dont know what u mean
What would i need to debug here??
I posted the code above...


//edit:

@Vince:

thx for ur answer but the problem is that no players are invisible. Every player of every team can see each other.
I think smth. is wrong in the looping part...
Reply
#7

You're setting the same color for both teams.
Reply
#8

ye but the problem is that this code has no effect at all!
The should be invisible on the minimap but they still have their regular colours...
Reply
#9

pawn Код:
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
That will make playerid's blip invisible to i (loop) and keep the color.
Reply
#10

Quote:
Originally Posted by MP2
Посмотреть сообщение
pawn Код:
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
That will make playerid's blip invisible to i (loop) and keep the color.
This will work only if he using SetPlayerColor smwhr
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)