SA-MP Forums Archive
Colours - 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: Colours (/showthread.php?tid=565180)



Colours - JordanDoughty - 25.02.2015

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

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


Re: Colours - ball - 25.02.2015

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

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


Re: Colours - JordanDoughty - 25.02.2015

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


AW: Colours - Nero_3D - 25.02.2015

pawn Код:
//next reply



Re: AW: Colours - JordanDoughty - 25.02.2015

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.


AW: Colours - Nero_3D - 25.02.2015

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]
);



Re: Colours - Abagail - 26.02.2015

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]"}");