Color embedding
#1

I've a text like this:

pawn Код:
format(str, sizeof(str), "{FFFFF}Bla bla{FF9900} and something about {FFFFFF}brigde{FF90FF} and la la {FFFFFF}la{FF90FF}");
SendClientMessageToAll(0xFF9000FF, str);
But the problem is, when I use color embedding thing three times, it doesn't sent the message. str variable is big enough. Is there any way to show 'em all?
Reply
#2

Does it send half of the message or?
Reply
#3

Well, why are you using a string for that message first off, or was that just an example?

I've got this:

pawn Код:
SendClientMessage( playerid, -1, "  "#Int_RankOrange"HINT: "#Int_White"Roleplay your injuries and then type "#Int_LimeGreen"/acceptdeath "#Int_White"to be transported to a medical center." );
and it's working perfectly fine. (Which is basically the same thing as yours, except I use definitions)
Reply
#4

Quote:
Originally Posted by 2KY
Посмотреть сообщение
Well, why are you using a string for that message first off, or was that just an example?

I've got this:

pawn Код:
SendClientMessage( playerid, -1, "  "#Int_RankOrange"HINT: "#Int_White"Roleplay your injuries and then type "#Int_LimeGreen"/acceptdeath "#Int_White"to be transported to a medical center." );
and it's working perfectly fine. (Which is basically the same thing as yours, except I use definitions)
Of course it was an example. Why on earth a server would send a message to players?

Anyway, I'll try that and edit that post. (if someone didn't reply before me.)
Reply
#5

If you're going to try my example, you're going to need my colour set. (Unless you were editing it for yourself.)

pawn Код:
// Colours

#define         Colour_White            (0xFFFFFFFF)
#define         Int_White               "{FFFFFF}"

#define         Colour_Red              (0xD10F0FFF)
#define         Int_Red                 "{D10F0F}"

#define         Colour_Yellow           (0xF6FF00FF)
#define         Int_Yellow              "{F6FF00}"

#define         Colour_AdminBlue        (0x56D7E8FF)
#define         Int_AdminBlue           "{56D7E8}"

#define         Colour_RankOrange       (0xF5AF0CFF)
#define         Int_RankOrange          "{F5AF0C}"

#define         Colour_LimeGreen        (0xC1E60BFF)
#define         Int_LimeGreen           "{C1E60B}"

#define         Colour_Grey             (0x525452FF)
#define         Int_Grey                "{525452}"

#define         Colour_Purple           (0x942DA6FF)
#define         Int_Purple              "{942DA6}"
Reply
#6

I tried your example but it didn't work. But i didn't use it with # thing at that point:

pawn Код:
SendClientMessage( playerid, -1, "  "#Int_RankOrange"HINT: "#Int_White"Roleplay your injuries and then type "#Int_LimeGreen"/acceptdeath "#Int_White"to be transported to a medical center." );
Reply
#7

Try this then.

pawn Код:
SendClientMessage( playerid, -1, "{D10F0F}This text should be red." );
If that doesn't work, I'm beginning to doubt you have the correct SA:MP version.
Reply
#8

Keep in mind that the maximum output string for a chat message is 144 characters. Anything longer simply won't be displayed. Every embedded color you use adds 8 characters to that limit.
Reply
#9

Oh yes. @2KY's is 126 characters with color tags. I think I should decrease my characters, first.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)