How to color a guilabel

Luis_Labarca

  • Sr. Member
  • Hello :D
  • Posts: 285
How to color a guilabel
« on June 18th, 2017, 01:50 AM »Last edited on June 18th, 2017, 05:07 AM
Code: [Select]
ColourRed<-"[#FF0000]"
ColourGreen<-"[#32CD32]"
GuiLabelTest <-null;

function Script::ScriptLoad()
{
::GuiLabelTest <- GUILabel(VectorScreen(0, 0), Colour(255, 255, 255),ColourRed+" TEXT "+ColourGreen+"TESTED " );
::GuiLabelTest.FontSize = 12;
::GuiLabelTest.FontName = "Lucida Console";
}

Hi how can i add color to a GuiLabel probe this code and salts is [#FF0000]TEXT [#32CD32]TESTED

I want it to come out like this TEXT  TESTED
My server ...:: RPG ::...
IP: 149.56.143.129:8195

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,088

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,759

Luis_Labarca

  • Sr. Member
  • Hello :D
  • Posts: 285
My server ...:: RPG ::...
IP: 149.56.143.129:8195

111

  • Jr. Member
  • Posts: 89

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,088
Re: How to color a guilabel
« Reply #5, on June 19th, 2017, 10:02 AM »
Make sure you add the tag flag before setting text.

Make sure your tags are lowercase.

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,759

111

  • Jr. Member
  • Posts: 89
Re: How to color a guilabel
« Reply #7,  »
Quote from Stormeus on June 19th, 2017, 10:02 AM
Make sure you add the tag flag before setting text.

Make sure your tags are lowercase.
Thanks. This one is works.
Code: [Select]
::GuiLabelTest <- GUILabel();
::GuiLabelTest.AddFlags(GUI_FLAG_TEXT_TAGS);
::GuiLabelTest.Colour = Colour(255,255,255,255);
::GuiLabelTest.Size = VectorScreen(0, 0);
::GuiLabelTest.Position = VectorScreen(200, 200);
::GuiLabelTest.Text = "asf[#ffee00]ewfwe";
::GuiLabelTest.FontSize = 12;
::GuiLabelTest.FontName = "Lucida Console";

Luis_Labarca

  • Sr. Member
  • Hello :D
  • Posts: 285
Re: How to color a guilabel
« Reply #8,  »
Quote from EK.IceFlake on June 19th, 2017, 11:16 AM
Quote from Luis_Labarca on June 19th, 2017, 12:34 AM
Quote from EK.IceFlake on June 18th, 2017, 08:55 PM
Quote from Luis_Labarca on June 18th, 2017, 01:50 AM
probe this code
I love your word choice. I'm serious.
>:( >:( >:( >:( >:( >:( >:( >:( >:( >:( >:( You suck everything you have to criticize :P :P :P :P :P :P :P :P :P :P :P
It's not criticism, I was serious.
It's not your problem
Re: How to color a guilabel
« Reply #9,  »
Quote from vito1 on June 19th, 2017, 02:52 PM
Quote from Stormeus on June 19th, 2017, 10:02 AM
Make sure you add the tag flag before setting text.

Make sure your tags are lowercase.
Thanks. This one is works.
Code: [Select]
::GuiLabelTest <- GUILabel();
::GuiLabelTest.AddFlags(GUI_FLAG_TEXT_TAGS);
::GuiLabelTest.Colour = Colour(255,255,255,255);
::GuiLabelTest.Size = VectorScreen(0, 0);
::GuiLabelTest.Position = VectorScreen(200, 200);
::GuiLabelTest.Text = "asf[#ffee00]ewfwe";
::GuiLabelTest.FontSize = 12;
::GuiLabelTest.FontName = "Lucida Console";
I had the same problem that did not work I fixed in the maxorator script and I saw that it was the colors with the labels in lowercase ;)
My server ...:: RPG ::...
IP: 149.56.143.129:8195