how? - 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: how? (
/showthread.php?tid=376681)
how? -
Windrush - 11.09.2012
How To Make Colored Dialog
pawn Код:
strcat(pDialog, "RANKS Score Needed\n\n", sizeof(pDialog));
strcat(pDialog, "Trainee 0 Score\n", sizeof(pDialog));
strcat(pDialog, "Private 100 Scores\n", sizeof(pDialog));
strcat(pDialog, "PFC 200 Scores\n", sizeof(pDialog));
strcat(pDialog, "Corporal 300 Scores\n", sizeof(pDialog));
strcat(pDialog, "Sergeant 400 Scores\n", sizeof(pDialog));
strcat(pDialog, "Staff Sergeant 500 Scores\n", sizeof(pDialog));
strcat(pDialog, "SFC 600 Scores\n", sizeof(pDialog));
strcat(pDialog, "Master Sergeant 700 Scores\n", sizeof(pDialog));
strcat(pDialog, "Second Lieutenant 800 Scores\n", sizeof(pDialog));
strcat(pDialog, "Captain 1000 Scores\n", sizeof(pDialog));
strcat(pDialog, "Major 1200 Scores\n", sizeof(pDialog));
strcat(pDialog, "Lieutenant Colonel 1400 Scores\n", sizeof(pDialog));
strcat(pDialog, "Brigadier General 2000 Scores\n", sizeof(pDialog));
strcat(pDialog, "Major General 2400 Scores\n", sizeof(pDialog));
strcat(pDialog, "General 3500 Scores\n", sizeof(pDialog));
strcat(pDialog, "Marshal 5000 Scores\n", sizeof(pDialog));
Please Give Me example
Re: how? -
Roach_ - 11.09.2012
Well you must use:
pawn Код:
{HEX} // PS: Without #
// For example
strcat(pDialog, "RANKS {C0C0C0}Score Needed\n\n", sizeof(pDialog));
And that will be grey
Re: how? -
clarencecuzz - 11.09.2012
Example:
0xFFFFFFFF = white, correct?
0xFF0000FF = red.
So let's say we want to use white, and THEN red text.
Take the first 6 Numbers/Letters after the 'x' sign in the hexadecimal.
0xFF0000FF becomes FF0000.
pawn Код:
"{FF0000}RED AND THEN {FFFFFF}WHITE"
Let's say you want 'General' to appear as red, but you want to switch it back to white afterwards.
pawn Код:
strcat(pDialog, "{FF0000}General {FFFFFF}3500 Scores\n", sizeof(pDialog)); //FF0000 - switch to red. FFFFFF - switch back to white.
COLORS LIST -
https://sampwiki.blast.hk/wiki/Hex_colours
EMBEDDING HELP -
https://sampwiki.blast.hk/wiki/Colors_List
Re: how? -
Windrush - 11.09.2012
Thanks You Very Much REP+