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



Player Colors - HidroDF - 24.01.2017

Hello! I'm making a Faction System and I need to colour the name of players in Scoreboard.
But the thing is, I only want to see the coloured name if the player is on my faction, if not, I will see the name white.
Код:
// Normal players
SetPlayerColor(playerid, 0xFFFFFFFF);
// Faction players
SetPlayerColor(playerid, 0x7ABE1FFF);

But if I do this, normal players can see the green colour, I need to show only the green letters if:

if(PlayerInfo[playerid][pFaction] == PlayerInfo[idtosee][pFaction]) Show Color Green
else Show Color White



Re: Player Colors - saffierr - 24.01.2017

I guess that's not possible in SA-MP.


Re: Player Colors - Eoussama - 24.01.2017

SetPlayerMarkerForPlayer(playerid, showplayerid, color)
source: https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer


Re: Player Colors - saffierr - 24.01.2017

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
SetPlayerMarkerForPlayer(playerid, showplayerid, color)
source: https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
That's setting a marker, but I guess his question was to have two seperate colours in your name on the TABLIST, and I told him that it was not possible.


Respuesta: Player Colors - HidroDF - 24.01.2017

Yes, I want to show the colour only on tablist, but If player is in a faction, only faction members can see the colour name in tablist.


Re: Player Colors - Eoussama - 24.01.2017

Then Create your own text draw that displays all connected players name, and you will have the ability to play with colors anyway you want
that's how I'd do it


Re: Player Colors - saffierr - 24.01.2017

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Then Create your own text draw that displays all connected players name, and you will have the ability to play with colors anyway you want
that's how I'd do it
Hm goodluck scripting that lol


Respuesta: Player Colors - HidroDF - 24.01.2017

If I want to remove a SetPlayerMarkerForPlayer(playerid, showplayerid, color); how it can be done?

Код:
CMD:markme(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        SetPlayerMarkerForPlayer(i, playerid, 0x7ABE1FFF);
		}
	}
    return 1;
}

CMD:unmarkme(playerid, params[])
{
    // How I can do that?
}



Re: Player Colors - Eoussama - 24.01.2017

If you meant to set the market color to the same color as the player's, then use
SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));


Respuesta: Player Colors - HidroDF - 24.01.2017

No, what I want is to unmark the mark xd I don't know If you understand me.

This is the example:

Код:
// I want players see me in mini-map
CMD:markme(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        SetPlayerMarkerForPlayer(i, playerid, 0x7ABE1FFF);
		}
	}
    return 1;
}

// I want to stop showing me in minimap
CMD:unmarkme(playerid, params[])
{
    // How I can do that?
}