Author Topic: Progress Bar  (Read 1555 times)

ARSEnic.

  • Newbie
  • *
  • Posts: 47
  • Karma: +17/-15
  • Hell o!
    • View Profile
Progress Bar
« on: March 13, 2015, 03: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

sasha19323

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +25/-24
    • View Profile
Re: Progress Bar
« Reply #1 on: March 13, 2015, 04: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;
}
« Last Edit: March 13, 2015, 08:23:24 pm by sasha19323 »

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Progress Bar
« Reply #2 on: March 13, 2015, 08: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.

ARSEnic.

  • Newbie
  • *
  • Posts: 47
  • Karma: +17/-15
  • Hell o!
    • View Profile
Re: Progress Bar
« Reply #3 on: March 14, 2015, 01:29:41 am »
Ooh ok thank you ill check it out

Beary

  • Newbie
  • *
  • Posts: 39
  • Karma: +2/-5
    • View Profile
Re: Progress Bar
« Reply #4 on: March 15, 2015, 05:37:11 am »
Ooh ok thank you ill check it out

i see you   ;)

ARSEnic.

  • Newbie
  • *
  • Posts: 47
  • Karma: +17/-15
  • Hell o!
    • View Profile
Re: Progress Bar
« Reply #5 on: March 22, 2015, 09:11:29 am »
Sorry to say this but the script dosen't work. :(

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Progress Bar
« Reply #6 on: March 22, 2015, 09:53:04 am »
Yeah, the snippet that sasha19323 provided was never fully fixed.


 

© Liberty Unleashed Team.