29.09.2014, 21:47
Quote:
No shit, we converted it to be usable as string by using (GetPlayerColor(playerid) >>> , then used {%06x}%s to embed it as hex...
No hard feelings, I'm glad to see you trying to help, thanks bro... Read before you think you know bro... |
You should be nicer to people, I didn't want to post something that was already stated above.
Plus, the code of ThePhenix and mine does the exact same thing, in this case (The example of ThePhenix and my line).
Here's another way of doing this, assuming you stored a colour "0xFF00FFFF" in a string "PlayerInfo[playerid][pColour]":
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[144], name[MAX_PLAYER_NAME], playercolour;
GetPlayerName(playerid, name, sizeof(name));
sscanf(PlayerInfo[playerid][pColour], "x", playercolour);
format(string, sizeof(string), "(%d) %s: {FFFFFF}%s", playerid, name, text);
SendClientMessageToAll(playercolour, string);
return 0;
}
- Regards,
SickAttack.