04.01.2014, 17:12
Alguien me puede Ayudar diciйndome como es para identificar el color de un player?
format(String, sizeof(String), "{%06x}%s",(GetPlayerColor(playerid) >>> 8),playername);
public OnPlayerText(playerid, text[])
{
new string[144];
new Nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nick, sizeof(Nick));
format(string, sizeof(string), "{%06x}%s [%d]: {FFFFFF}%s", GetPlayerColor(playerid) >>> 8, Nick, playerid, text);
SendClientMessageToAll(-1, string);
SetPlayerChatBubble(playerid, text, -1, 100.0, 4000);
return 0;
}
Yo lo tengo asн:
pawn Код:
|
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
Nick[playerid] = TextDrawCreate(65.000000, 425.000000, "");
TextDrawBackgroundColor(Nick[playerid], 255);
TextDrawFont(Nick[playerid], 1);
TextDrawLetterSize(Nick[playerid], 0.250000, 1.800000);
TextDrawColor(Nick[playerid],Blanco );
TextDrawSetOutline(Nick[playerid], 0);
TextDrawSetProportional(Nick[playerid], 1);
TextDrawSetShadow(Nick[playerid], 1);
}
format(String, sizeof(String), "{%06x}%s",(GetPlayerColor(playerid) >>> 8),playername);
TextDrawSetString(Nick[playerid], String);
TextDrawShowForPlayer(playerid,Nick[playerid]);