ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. guiCreateProgressBar

Function

guiCreateProgressBar

Creates a progress bar (0-100).

Syntax

gui-progressbar guiCreateProgressBar(float x, float y, float width, float height, bool relative [, element parent = nil])

Arguments

xfloat
X position.
yfloat
Y position.
widthfloat
Width.
heightfloat
Height.
relativebool
Relative values.Optional in MTA:SA: bool relative = false
parentelement, optional = nil
Parent.

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

guiCreateProgressBar(float x, float y, float width, float height, bool relative = false, gui-element parent = nil)

Returns

The bar.

Example

local bar = guiCreateProgressBar(20, 20, 300, 24, false)
local p = 0
setTimer(function()
    p = p + 10
    guiProgressBarSetProgress(bar, p)
end, 500, 10)

See also