Color Coding Question -
Abreezy - 23.01.2012
Hey quick question on message sizes, first example is what i'm trying to do, second is what works.
pawn Код:
format( string5, sizeof( string5 ), "Cash: "COL_LIGHTBLUE"%d "COL_WHITE"| | Bank Balance: "COL_LIGHTBLUE"%s "COL_WHITE"| | PayCheck: "COL_LIGHTBLUE"%d "COL_WHITE"| | Pay Time: "COL_LIGHTBLUE"%d Minutes "COL_WHITE"| |",GetPlayerMoney(id),PlayerInfo[playerid][pBankAmount],PlayerInfo[playerid][pPayCheck],TimeLeft);
And this is the one that works:
pawn Код:
format( string5, sizeof( string5) ,"Cash: %d | | Bank Balance: %s | | PayCheck: %d | | Pay Time: %d Minutes | |",GetPlayerMoney(id),PlayerInfo[playerid][pBankAmount],PlayerInfo[playerid][pPayCheck],TimeLeft);
Does the "COL_LIGHTBLUE" and "COL_WHITE" count as characters? I heard you can't output more then 128 characters, So I'm guessing it does, if it does, is there another way to do this?
Re: Color Coding Question -
Oh - 23.01.2012
Instead of "COL_LIGHTBLUE" do like
Cash: {00FFFF}%d
for each one just use html colors.
pawn Код:
format( string5, sizeof( string5 ), "Cash: {00FFFF}%d {FFFFFF}| | Bank Balance: {00FFFF}%s {FFFFFF}| | PayCheck: {00FFFF}%d {FFFFFF}| | Pay Time: {00FFFF}%d minutes{FFFFFF}| |",GetPlayerMoney(id),PlayerInfo[playerid][pBankAmount],PlayerInfo[playerid][pPayCheck],TimeLeft);
Re: Color Coding Question -
Abreezy - 23.01.2012
Oh, Alright, I had them defines for easier use such as:
pawn Код:
#define COL_LIGHTBLUE "{00C0FF}"
Re: Color Coding Question -
Oh - 23.01.2012
Did it for you above, yeah but that works too.
Re: Color Coding Question -
Abreezy - 23.01.2012
Well
pawn Код:
Cash: {00FFFF}%d {FFFFFF}| | Bank Balance: {00FFFF}%s {FFFFFF}| | PayCheck: {00FFFF}%d {FFFFFF}| | Pay Time: {00FFFF}%d minutes{FFFFFF}| |
Is still longer then 128, so it didn't show up

.
Re: Color Coding Question -
Gh05t_ - 23.01.2012
Hex colors which has been added in 0.3c if I'm not mistaken lengthens the string. Increase the size to 156 (which is to believed the max char assignment when embedding.