11.02.2011, 19:37
Im not too sure how you would do this, because ive never tried, but from experiences with format(..) i would try;
Just give it a try, to be honest i doubt it will work because ive never tried passing hexadecimal in a string before.
pawn Код:
public OnPlayerConnect(playerid)
{
//Remeber you need to do SetPlayerColour before GetPlayerColour can be used.
new string[128], pName[24], colour[30];
format(colour, sizeof(colour), "%x", GetPlayerColor(playerid));
strdel(colour, 4, strlen(colour));
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "{%x}%s {FFFFFF} has joined SERVER NAME", colour, pName);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}