Posts: 175
Threads: 9
Joined: Aug 2010
I want to make the id colour to this: 0x24FF0AB9 witch is light green...
code:
Код:
public OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string),"[%d] %s",playerid, text);
SendPlayerMessageToAll(playerid,string);
return 0;
}
So here, I wanna make playerid to colour 0x24FF0AB9, but everytime I try to do it, always goes wrong
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Ironboy
You mean this?
pawn Код:
#define COLOR_GREEN 0x24FF0AB9
|
No, I mean making the id another color, in this case, making %d(playerid) color 0x24FF0AB9
Posts: 1,942
Threads: 89
Joined: Nov 2010
Reputation:
0
For that you should seperate the player team.
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Ironboy
For that you should seperate the player team.
|
Nah, I don't wanna do teams.. just want to have a function like "SetPlayerColor(playerid, 0xFA8072FF);" but for the id.. not the nickname.
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Richie
pawn Код:
switch(playerid) { case 0: SetPlayerColor(playerid, 0x24FF0AB9); // Sets green color to playerid 0. case 1: // Same here with color you want for id 1. }
Its one way to do it, but alot of work if you want evey single player with different colors. That one can be used after login to set player color.
Here is another way of doing it, under OnPlayerText;
pawn Код:
switch(playerid) { case 0: SendClientMessageToAll(0x24FF0AB9, text); case 1: // Same here with color you want for id 1. }
|
It's not that, I want the id to change of colour, not the nickname....
when someone says something, it looks like this:
PlayerX: [0] I'm talking
[0] = id, I want this part to be colored as green... if the 0(id) is not possible to change the colour, then it whould be enough to change the [ ] colours.
Posts: 175
Threads: 9
Joined: Aug 2010
Quote:
Originally Posted by Fj0rtizFredde
Use colour embedding {RGB color here}.
pawn Код:
public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string),"{24FF0A}[%d]{FFFFFF} %s",playerid, text); SendPlayerMessageToAll(-1,string); return 0; }
First I turn the playerid to green then the message to white.
|
Now nothing appears when chatting..
code:
public OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string),"{00FF00}[%d]{FFFFFF} %s",playerid, text);
SendPlayerMessageToAll(-1,string);
return 0;
}