SA-MP Forums Archive
Make team invisable on radar. - 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: Make team invisable on radar. (/showthread.php?tid=304340)



Make team invisable on radar. - Dustly - 18.12.2011

Before anything.. I tried samp wiki... and alls it gave me was useless shit...
I need to make one of my team invisable on radar.. in other words "make their player marker invisable"
I am using Gteam, Now some one please let me know How I could do this under onplayerspawn.

Quote:

if (gTeam[playerid] == TEAM_taliban)
{
<<<<<What can I put here to make this happen?
}




Re: Make team invisable on radar. - Calgon - 18.12.2011

https://sampwiki.blast.hk/wiki/SetPlayerColor

Try setting the player's colour to 0xFFFFFF00.

pawn Code:
if (gTeam[playerid] == TEAM_taliban) {
   SetPlayerColor(playerid, 0xFFFFFF00);
}



Re: Make team invisable on radar. - Dustly - 18.12.2011

Quote:
Originally Posted by Calgon
View Post
https://sampwiki.blast.hk/wiki/SetPlayerColor

Try setting the player's colour to 0xFFFFFF00.

pawn Code:
if (gTeam[playerid] == TEAM_taliban) {
   SetPlayerColor(playerid, 0xFFFFFF00);
}
I need somthing that wont change their chat color, but will change radar color.


Re: Make team invisable on radar. - Calgon - 18.12.2011

Ah ok, try this:

pawn Code:
if (gTeam[playerid] == TEAM_taliban) {
   SetPlayerColor(playerid, (ORIGINAL_COLOUR | 0x000000FF ));
}
Replace 'ORIGINAL_COLOUR' with the real colour for them.


Re: Make team invisable on radar. - Dustly - 18.12.2011

I see ORIGINAL_COLOR will set their color in chat and the other one will set marker color...

Now I understand why you have so much rep Calgon. Thanks for taking the time to help me. REP+


Re: Make team invisable on radar. - Lorenc_ - 18.12.2011

pawn Code:
stock HideTeamMarkers(playerid)
{
    for(new x; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
    {
        if(gTeam[x] == gTeam[playerid])
        {
            SetPlayerMarkerForPlayer(playerid, x, (GetPlayerColor(x) & 0xFFFFFF00));
            SetPlayerMarkerForPlayer(x, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
        }
    }
    return 1;
}
Pop this under onplayerspawn

EDIT: WHY AM I SO LATE -.-


Re: Make team invisable on radar. - Dustly - 18.12.2011

Thats also usefull... Ill giver you some rep too =)

Glad there so many people in samp forums ready to help.


Re: Make team invisable on radar. - jamesbond007 - 18.12.2011

Quote:
Originally Posted by Calgon
View Post
Ah ok, try this:

pawn Code:
if (gTeam[playerid] == TEAM_taliban) {
   SetPlayerColor(playerid, (ORIGINAL_COLOUR | 0x000000FF ));
}
Replace 'ORIGINAL_COLOUR' with the real colour for them.
what does this | symbol do? is this some kind of bitwise operator or something ??


Re: Make team invisable on radar. - Dustly - 18.12.2011

Quote:
Originally Posted by Lorenc_
View Post
pawn Code:
stock HideTeamMarkers(playerid)
{
    for(new x; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
    {
        if(gTeam[x] == gTeam[playerid])
        {
            SetPlayerMarkerForPlayer(playerid, x, (GetPlayerColor(x) & 0xFFFFFF00));
            SetPlayerMarkerForPlayer(x, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
        }
    }
    return 1;
}
Pop this under onplayerspawn

EDIT: WHY AM I SO LATE -.-
Can some one explain how this would work


Re: Make team invisable on radar. - Dustly - 18.12.2011

Anyone?