SA-MP Forums Archive
Question - 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: Question (/showthread.php?tid=611838)



Question - MayaEU - 11.07.2016

Hello, i was wondering if its possible to set the marker color, to players team color
Example If someone is in a "red" family, and another one is in a "green" family, but they join the same gangchat
they can see each other on the map. So my question if its possible to make that the markers are the same color
as their TeamColor? (SetPlayerToTeamColor(playerid)

pawn Код:
stock ShowGang(playah,gang)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pGang] == gang && !PlayerInfo[i][pBanished])
        {
            SetPlayerMarkerForPlayer(i, playah, 0xFFFFFFAA);
            SetPlayerMarkerForPlayer(playah, i, 0xFFFFFFAA);
        }
    }
    return 1;
}



Re: Question - MayaEU - 11.07.2016

Maybe with GetPlayerColor? i dont know how to make it


Re: Question - WhiteGhost - 11.07.2016

Huh? when u
Код:
SetPlayerColor();
The Marker automatically change to that color.
So isnt that it?


Re: Question - MayaEU - 11.07.2016

Also, in my server there are diffrent teams
and they can join a chat, and then they can see each other on the map
but the markers are white, but i want it like that, they will be marked on the map
as the same color as their team color


Re: Question - ArminKH - 11.07.2016

Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pGang] == gang) {
        SetPlayerColor(playerid, gangcolor);
    }
    return 1;
}



Re: Question - WhiteGhost - 11.07.2016

I believe your code is the error.
Because when u create the teams and there colors it the markers should be the color depends on how u code it u should use
Код:
SetPlayerToTeamColor(playerid)



Re: Question - MayaEU - 11.07.2016

I think you guys dont understand me.
I have factions/families and they have name colors, but then they can join a seperate ganchat /joingang [number]
and when they are in that chat they can see each other on the minimap, but right now the markers are white.
i would like if i could make that the marker is the same color as their name colors


Re: Question - Mencent - 11.07.2016

Hello!

Sorry when I have to ask although you explain it much times.
Each gang has his own color, that's right? You want to give the people in the gang with the green color the color green in the map, don't you?


Re: Question - MayaEU - 11.07.2016

Yes exactly, sorry for my bad English ^^


Re: Question - WhiteGhost - 11.07.2016

Quote:
Originally Posted by MayaEU
Посмотреть сообщение
Yes exactly, sorry for my bad English ^^
Then u use. https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer