Color in a dialog
#1

Код 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?
Reply
#2

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"
Reply
#3

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"
Reply
#4

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?
Reply
#5

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


Forum Jump:


Users browsing this thread: 4 Guest(s)