ID and the player name
#1

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

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

MAKE ME PAWN CODE PLS
Reply
#4

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

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

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)