only teammates visible on radar -
BlackWolf120 - 17.04.2011
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.
Re: only teammates visible on radar -
iJumbo - 18.04.2011
what this do ingame?
Re: only teammates visible on radar -
BlackWolf120 - 18.04.2011
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
Re: only teammates visible on radar -
iJumbo - 18.04.2011
nono i mean what this code you make do in game for debuging
Re: only teammates visible on radar -
Vince - 18.04.2011
Код:
0xFFFFFF00
0xRRGGBBAA
Look at the alpha (AA) part. It ranges from 00 (completely invisible) to FF (completely visible).
Re: only teammates visible on radar -
BlackWolf120 - 18.04.2011
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...
Re: only teammates visible on radar -
MP2 - 18.04.2011
You're setting the same color for both teams.
Re: only teammates visible on radar -
BlackWolf120 - 18.04.2011
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...
Re: only teammates visible on radar -
MP2 - 18.04.2011
pawn Код:
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
That will make playerid's blip invisible to i (loop) and keep the color.
Re: only teammates visible on radar -
Gh0sT_ - 18.04.2011
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