Vice City: Multiplayer

Server Development => Scripting and Server Management => Client Scripting => Topic started by: Luis_Labarca on Jun 18, 2017, 12:50 AM

Title: How to color a guilabel
Post by: Luis_Labarca on Jun 18, 2017, 12:50 AM
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
Title: Re: How to color a guilabel
Post by: Stormeus on Jun 18, 2017, 05:38 AM
::GuiLabelTest.AddFlags(GUI_FLAG_TEXT_TAGS);
Title: Re: How to color a guilabel
Post by: EK.IceFlake on Jun 18, 2017, 07:55 PM
Quote from: Luis_Labarca on Jun 18, 2017, 12:50 AMprobe this code

I love your word choice. I'm serious.
Title: Re: How to color a guilabel
Post by: Luis_Labarca on Jun 18, 2017, 11:34 PM
Quote from: EK.IceFlake on Jun 18, 2017, 07:55 PM
Quote from: Luis_Labarca on Jun 18, 2017, 12:50 AMprobe 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
Title: Re: How to color a guilabel
Post by: vito1 on Jun 19, 2017, 04:55 AM
Quote from: Stormeus on Jun 18, 2017, 05:38 AM::GuiLabelTest.AddFlags(GUI_FLAG_TEXT_TAGS);
It's not working for label currently.
Title: Re: How to color a guilabel
Post by: Stormeus on Jun 19, 2017, 09:02 AM
Make sure you add the tag flag before setting text.

Make sure your tags are lowercase.
Title: Re: How to color a guilabel
Post by: EK.IceFlake on Jun 19, 2017, 10:16 AM
Quote from: Luis_Labarca on Jun 18, 2017, 11:34 PM
Quote from: EK.IceFlake on Jun 18, 2017, 07:55 PM
Quote from: Luis_Labarca on Jun 18, 2017, 12:50 AMprobe 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.
Title: Re: How to color a guilabel
Post by: vito1 on Jun 19, 2017, 01:52 PM
Quote from: Stormeus on Jun 19, 2017, 09:02 AMMake sure you add the tag flag before setting text.

Make sure your tags are lowercase.
Thanks. This one is works.
::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";
Title: Re: How to color a guilabel
Post by: Luis_Labarca on Jun 19, 2017, 03:02 PM
Quote from: EK.IceFlake on Jun 19, 2017, 10:16 AM
Quote from: Luis_Labarca on Jun 18, 2017, 11:34 PM
Quote from: EK.IceFlake on Jun 18, 2017, 07:55 PM
Quote from: Luis_Labarca on Jun 18, 2017, 12:50 AMprobe 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
Title: Re: How to color a guilabel
Post by: Luis_Labarca on Jun 19, 2017, 03:07 PM
Quote from: vito1 on Jun 19, 2017, 01:52 PM
Quote from: Stormeus on Jun 19, 2017, 09:02 AMMake sure you add the tag flag before setting text.

Make sure your tags are lowercase.
Thanks. This one is works.
::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 ;)