Welcome to the forum, Guest

To access forum content and all of our services, you must register or log in to the forum. Joining the forum and all content on the forum is completely free.

The world's largest FiveM Forum and GTA 5 Forum address

Hello dear member,
We work 24/7 to provide the most valuable content that will be of use to you,
you can share content and support the entire FiveM & GTA 5 community.

Script NProgressbar | drawing progress bar with game base native

Ares

Head Admin
Joined
May 6, 2021
Messages
520
Reaction score
355
Points
326
Location
Turkey
Website
vag.gg
ezgif-5-8a58383efaae







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:

Code:
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)
 

Login or register to get more out of the forum!

Login or register to get more out of the forum!

Register

Creating an account on the forum is completely free.

Register now
Log in

If you have an account, please login

Log in

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds