[Release]NProgressbar | drawing progress bar with game base native

ezgif-5-8a58383efaae

Video

Github

NProgressbar | drawing progress bar with game base native

Install:

#method1:
resources.cfg

client_script "@nprogressbar_native/progressbar.lua"

then Call

CreateProgress(...)

#method2:

exports.nprogressbar_native:CreateProgress(...)

#method3:

TriggerEvent('CreateProgress',...)

functions:

CreateProgress(duration,text,cb,font,p1,p2,transparent,color1,color2,color3) 

duration (number): the time progress remain
text (string): background text
Optinals:
cb (function): callback function
font (string/number): custom font name or default font “$Font2” or fontid just like SetTextFont(here)
p1,p2 (string/number): “L”,“B” / “L”,“T” / “C”,“C” / “C”,“B” / “C”,“T” / “R”,“T” / “R”,“B” or 0.35,0.45
transparent (number): opacity value of colors 0.0~1.0
color1 (table): color of value bar
color2 (table): color of trough bar/background
color3 (table): textcolor {255,0,123} or {255,0,0,120}

#Example:

CreateThread(function()
    TriggerEvent('CreateProgress',3000,'Waiting for this...',function(text)
        print(text)
    end,"$Font2","C","T")
    CreateProgress(4000,'loading233333333333333333333333333',function(text)
        print(text)
    end)
    CreateProgress(7764,'Go1!',function(text)
        print(text)
    end,"$Font2","C","B",0.5,{0,255,255},{0,0,0})
    CreateProgress(5566,'Go2!',function(text)
        print(text)
    end,"$Font2","L","T",0.5,{0,255,255},{0,0,0})
    CreateProgress(2323,'Go3!',function(text)
        print(text)
    end,"$Font2","R","T",0.5,{0,255,255},{0,0,0})
    CreateProgress(7115,'Go4!',function(text)
        print(text)
    end,"$Font2","L","C",0.5,{0,255,255},{0,0,0})
    CreateProgress(2222,'Go5!',function(text)
        print(text)
    end,"$Font5","R","C",0.5,{0,255,255},{0,0,0})
    CreateProgress(4444,'Go6!',function(text)
        print(text)
    end,"$Font2","L","B",0.5,{0,255,255},{0,0,0},{0,255,255})
    CreateProgress(3333,'GoBBB!',function(text)
        print(text)
    end,"$Font2",0.7,0.2,0.5,{0,255,255},{0,0,0},{0,255,255,255})
end)
6 Likes

Looks good thanks for your contribution to the community :grinning_face_with_smiling_eyes:

1 Like

Another useful resource!

1 Like

cool progressbar