Player Colors
#1

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
Reply
#2

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

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

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.
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply
#8

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?
}
Reply
#9

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

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?
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)