guiProgressBarSetProgress | Multi Theft Auto: Wiki Skip to content

guiProgressBarSetProgress

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used to set the progress of a progressbar as a percentage.

Syntax

guiProgressBarSetProgress ( )

Code Examples

client

This example sets the progress of a bar called "somebar" created withguiCreateProgressBar, and outputs it to the chatbox.

-- If the progressbar exsist then
if ( somebar ) then
-- set the progress
guiProgressBarSetProgress(somebar, 80)
-- get the progress
progress = guiProgressBarGetProgress(somebar)
-- output to the chatbox
outputChatBox ( "Current progress:" .. progress .. "%" )
else --if the progressbar was not found
outputChatBox ("progressbar not found!")
-- output a message
end

See Also

GUI Functions