Liberty Unleashed

Scripting => Script Help => Topic started by: ARSEnic. on March 13, 2015, 02:41:33 pm

Title: Progress Bar
Post by: ARSEnic. on March 13, 2015, 02:41:33 pm
Hello! Everyone errr id like some help in the GUi progress bar thing as the wiki dosent say a damn thing could someone upload a script here  about Progress bars? Thank you in advance
Title: Re: Progress Bar
Post by: sasha19323 on March 13, 2015, 03:17:22 pm
Code: ("Client-side script") [Select]
function onScriptLoad()
{
Bar <- GUIProgressBar(VectorScreen(800, 600), ScreenSize(140, 10)); //140x10 Bar
Bar.MaxValue = 100;
Bar.StartColour = Colour(0, 0, 0); //Colour of bar, when value is minimal
Bar.EndColour = Colour(0, 100, 255); //Colour of bar, when value is max
Bar.Thickness = 5; //Thickness of the borders of bar
Bar.Visible = true;
Window.AddChild(Bar); // Change "Window" to needed variable (thx Vortrex for correction)
}
function onClientRender()
{
Bar.Value = FindLocalPlayer().Health;
}
Title: Re: Progress Bar
Post by: Vortrex on March 13, 2015, 07:14:53 pm
I don't think you can add a progress bar as a GUI layer.
It would have to be put as a child element of a window.

You could make a window with the same size as the progress bar, remove the titlebar, and place a progress bar at VectorScreen( 0 , 0 ) to put it in the top left corner of the window's position, which would cover up the fact that it's in a window.
Title: Re: Progress Bar
Post by: ARSEnic. on March 14, 2015, 12:29:41 am
Ooh ok thank you ill check it out
Title: Re: Progress Bar
Post by: Beary on March 15, 2015, 04:37:11 am
Ooh ok thank you ill check it out

i see you   ;)
Title: Re: Progress Bar
Post by: ARSEnic. on March 22, 2015, 08:11:29 am
Sorry to say this but the script dosen't work. :(
Title: Re: Progress Bar
Post by: Vortrex on March 22, 2015, 08:53:04 am
Yeah, the snippet that sasha19323 provided was never fully fixed.