SA-MP Forums Archive
Color in a dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Color in a dialog (/showthread.php?tid=628444)



Color in a dialog - boy - 10.02.2017

Код HTML:
	format(string, sizeof(string), "{%d}%s {ffffff}Locker", FactionInfo[PlayerInfo[targetid][Faction]][FactionColor], FactionInfo[PlayerInfo[targetid][Faction]][FactionName]);
	strcat(lock1, string);
Does anyone know how I can make something stored in a enum go in the dialog?


Re: Color in a dialog - kloning1 - 10.02.2017

Edited.
Quote:
Originally Posted by Dutheil
Посмотреть сообщение
This is normal, because you use the specifier %d for an embed color.
FactionColor needs to be an array, and the specifier have to be %s.

So : "{%s}%s {ffffff}Locker"



Re: Color in a dialog - Dutheil - 10.02.2017

This is normal, because you use the specifier %d for an embed color.
FactionColor needs to be an array, and the specifier have to be %s.

So : "{%s}%s {ffffff}Locker"


Re: Color in a dialog - boy - 10.02.2017

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
This is normal, because you use the specifier %d for an embed color.
FactionColor needs to be an array, and the specifier have to be %s.

So : "{%s}%s {ffffff}Locker"
But here's my problem, I have to make this color display in both a 3dTextLabel and a Dialog. How would I do that?


Re: Color in a dialog - Konstantinos - 10.02.2017

Keep the color as an integer and use it like:
pawn Код:
"{%06x}...", FactionInfo[PlayerInfo[targetid][Faction]][FactionColor] >>> 8, ...