VIP dialog help -
MichaelWharton101 - 13.01.2013
Okay so I want to add diffrent colors into my dialong
Код:
case 16: // VIP Dialog
{
ShowPlayerDialog(playerid, 16, DIALOG_STYLE_LIST, "Choose a vehicle type", "VIP Color (Bronze VIP)\nVIP Tag Above Head (Silver VIP)\nTune Vehicle (Silver VIP)\nCreate Advertisement (Silver VIP)\nChange Skin (Gold VIP)\nChange Age (Gold VIP)\nChange Gender (Gold VIP)\nChange Name (Platinum VIP)", "Choose", "Cancel");
}
So lets say I want "Change Name (Platinum VIP)" in the dialog to be green, how would I do that?
Re: VIP dialog help -
[HK]Ryder[AN] - 13.01.2013
pawn Код:
case 16: // VIP Dialog
{
ShowPlayerDialog(playerid, 16, DIALOG_STYLE_LIST, "Choose a vehicle type", "VIP Color (Bronze VIP)\nVIP Tag Above Head (Silver VIP)\nTune Vehicle (Silver VIP)\nCreate Advertisement (Silver VIP)\nChange Skin (Gold VIP)\nChange Age (Gold VIP)\nChange Gender (Gold VIP)\n {00FF00} Change Name (Platinum VIP)", "Choose", "Cancel");
}
Re: VIP dialog help -
MichaelWharton101 - 13.01.2013
Umm... What did u do to it?
Re: VIP dialog help -
[MM]18240[FMB] - 13.01.2013
He added
a simple color hex can make a huge difference.
Re: VIP dialog help -
Threshold - 13.01.2013
This is known as color or chat/dialog embedding. Let's say for example, we wanted to add RED. Red as a hexadecimal value is: 0xFF0000FF, now all we do is take away the transparency (Alpha Values) which is 00-FF, also explained
HERE. So we are left with: "0xFF0000", now all you want to do is take away the '0x', so we are left with
FF0000. Then take this value, and wrap it in brackets like so:
{FF0000}. Now we simply insert this into the text we want it. Take for example, I have:
pawn Код:
SendClientMessage(playerid, 0xFFFFFFFF /* White */, "Red, Yellow, Green, Blue");
Now I want to make red appear red, yellow appear yellow, etc.
Red = 0xFF0000FF | No Alpha = 0xFF0000 | Hex = FF0000 | Complete =
{FF0000}
Yellow = 0xFFFF00FF | No Alpha = 0xFFFF00 | Hex = FFFF00 | Complete =
{FFFF00}
Green = 0x00FF00FF | No Alpha = 0x00FF00 | Hex = 00FF00 | Complete =
{00FF00}
Blue = 0x0000FFFF | No Alpha = 0x0000FF | Hex = 0000FF | Complete =
{0000FF}
Then we simply insert them where we want them, so it will end up being this:
pawn Код:
SendClientMessage(playerid, 0xFFFFFFFF /* White */, "{FF0000}Red, {FFFF00}Yellow, {00FF00}Green, {0000FF}Blue");
I probably shouldn't have gone into so much detail, as you can read the basic tutorial here:
https://sampwiki.blast.hk/wiki/Colors#Ch...alog_embedding
Good luck.
Re: VIP dialog help -
MichaelWharton101 - 13.01.2013
thank you, I got it.