Colours
#1

How do you change colours through a sentence, for example.

pawn Код:
SendClientMessage(playerid, COLOR_BLACK, "H"COLOR_RED"ello");
and it would show Hello.
Reply
#2

Код:
#define RED "{FF0000}"

SendClientMessage(playerid, COLOR_BLACK, "H"RED"ello");
Definition contains only RGB colors.
Reply
#3

Quote:
Originally Posted by ball
Посмотреть сообщение
Код:
#define RED "{FF0000}"

SendClientMessage(playerid, COLOR_BLACK, "H"RED"ello");
Definition contains only RGB colors.
Thanks, so say I had

pawn Код:
new COLOR_BANDANA = FamilyInfo[i][FamilyColor];
pawn Код:
format(string, sizeof(string), "%d) Name: - %s - Leader: %s - Members: %d",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
How would I show the BANDANA where it says the name
Reply
#4

pawn Код:
//next reply
Reply
#5

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
pawn Код:
format(string, sizeof(string),
    "{FFFFFF}%d) Name: - {%06x}%s{FFFFFF} - Leader: %s - Members: %d",
    number,
    FamilyInfo[i][FamilyColor],
    FamilyInfo[i][FamilyName],
    FamilyInfo[i][FamilyLeader],
    FamilyInfo[i][FamilyMembers]
);
it shown as
Код:
{7FFF0000}FamilyName
, not the colour.
Reply
#6

Yeah forgot something

pawn Код:
format(string, sizeof(string),
    "{FFFFFF}%d) Name: - {%06x}%s{FFFFFF} - Leader: %s - Members: %d",
    number,
    FamilyInfo[i][FamilyColor] >>> 8,
    FamilyInfo[i][FamilyName],
    FamilyInfo[i][FamilyLeader],
    FamilyInfo[i][FamilyMembers]
);
Reply
#7

Going to your first example, you can directly insert a hex string using quotes(this directly inputs the definition / variable in the string without the need for formatting).

So something like this should work just fine:
pawn Код:
SendClientMessage(playerid, -1, "Family Color: {"FamilyInfo[i][FamilyColor]"}");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)