Liberty Unleashed
Scripting => Script Help => Topic started 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
-
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;
}
-
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.
-
Ooh ok thank you ill check it out
-
Ooh ok thank you ill check it out
i see you ;)
-
Sorry to say this but the script dosen't work. :(
-
Yeah, the snippet that sasha19323 provided was never fully fixed.