Color en format?
#1

Necesito a un format agregarle el color que tiene el jugador con GetPlayerColor(playerid)
Reply
#2

@EDIT

pawn Код:
new string[128];
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
format(string, sizeof(string),"{%x}%s", ((GetPlayerColor(playerid) >>> 8)), nick);
Reply
#3

pawn Код:
format(string, sizeof(string), "{%06x}", (GetPlayerColor(playerid) >>> 8));
Reply
#4

No gente, ninguno de los 2 funca
Gracias! Cierren.
Reply
#5

GetPlayerColor no retornada nada hasta que SetPlayerColor sea utilizado.
El bug: https://sampwiki.blast.hk/wiki/GetPlayerColor
Reply
#6

pawn Код:
new BornString[16];
format(BornString,sizeof(BornString),"{%h}Color",(GetPlayerColor >>> 8));
SendClientMessage(playerid,-1,BornString);
pawn Код:
const COLOR_ROJO = 0xAA3333AA;
const COLOR_VERDE = 0x33AA33AA;
const COLOR_AMARILLO = 0xFFFF00AA;
const COLOR_NARANJA = 0xFF9900AA;

new BornString[64];
format(BornString,sizeof(BornString),"Blanco{%h}Rojo{%h}Verde{%h}Amarillo{%h}Naranja",(COLOR_ROJO >>> 8),(COLOR_VERDE >>> 8),(COLOR_AMARILLO >>> 8),(COLOR_NARANJA >>> 8));
SendClientMessageToAll(-1,BornString);
Reply
#7

Para eso uso

pawn Код:
new BornString[16];
format(BornString,sizeof(BornString),"hola hola, este es mi color");
SendClientMessage(playerid,GetPlayerColor(playerid),BornString);
Gracias igual, pero tiene razon Vladeksh, no retorna hasta que SetPlayerColor sea utilizado.
Saludos!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)