How to hide all Player markers and name tags from a team?
#4

Quote:
Originally Posted by DJ-CJ89
First Step: Put this on Script Header; #define invisible 0xFFFFFF00


Thats easy
I use the same function in my gamemode
its selfmade

example code! you have to edit your team variables.

//under OnPlayerUpdate
Код:
for(new i=0; i<MAXPLAYERS; i++)
{
if(gTeam[playerid] == your_Team_no1_here)
{
   SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(playerid) & invisible);
}
else if(gTeam[playerid] == your_Team_no2_here)
{
   SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(playerid) & invisible);
}
}
I can explain it that way:

SetPlayerMarkerForPlayer(playerid,i, ThePlayerColorForChatBox & ThePlayersMapColor);

To add a command to switch this function on/off u can simply use a variable.
LoL i tried it, but now are all players and vehicles invisible and in TAB (score list) the team color is the same as mine now :/
(i tested it with some friends) and if they are on the ennemy team, (witch is color reD) for them im also red on their score list, and when im green team they are green for me)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)