SA-MP Forums Archive
ID and the player name - 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: ID and the player name (/showthread.php?tid=460165)



ID and the player name - BoU3A - 27.08.2013

how to make the ID and the player name same color in the server chat


Re: ID and the player name - CrazyChoco - 27.08.2013

By changing their colors? Other wise you could get the specified playerteam and then set it to that color you want.

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


Re: ID and the player name - BoU3A - 27.08.2013

MAKE ME PAWN CODE PLS


Re: ID and the player name - JimmyCh - 27.08.2013

This section is for scripting help, not "request a script".
Show us what you have already so we can "help" you out, we won't just write it down for you, we ain't scripting machines.

Anyway, your code probably has somewhere where it sets the player's color, either by team or just randomly.
Mind showing us that?


Re: ID and the player name - BoU3A - 27.08.2013

OnPlayerText i have this

Код:
    format(strg, sizeof(strg), "[%d]: %s", playerid, text);
    SendPlayerMessageToAll(playerid, strg);
    format(strg, sizeof(strg), "%s", text);
    SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
	return 0;



Re: ID and the player name - EiresJason - 27.08.2013

Add this too OnPlayerConnect.

SetPlayerColor(playerid,COLORHERE);

For mine to work; I define COLOR_WHITE.
pawn Код:
#define COLOR_WHITE         0xFFFFFFAA
And then under OnPlayerConnect, I have.
pawn Код:
SetPlayerColor(playerid,COLOR_WHITE);
So when players connect; they get the colour white. I'm creating a Roleplay script so I want all my players to have white names.


Re: ID and the player name - BoU3A - 27.08.2013

thanks man but i want the player id and the player name same color... "like not name red and id white"


Re: ID and the player name - EiresJason - 27.08.2013

Did you try it though? I'm pretty sure it would do it.


Re: ID and the player name - nor15 - 27.08.2013

pawn Код:
if(text[0])
    {
        format(string,sizeof(string),"%s(%d): {FFFFFF}%s",PlayerName(playerid),playerid,text);
        SendClientMessageToAll(GetPlayerColor(playerid),string);
        return 0;
    }
This gonna Work , Just put it Under OnPlayerText