AFU.Progressbar ![:heart_eyes: :heart_eyes:](https://forum.cfx.re/images/emoji/twitter/heart_eyes.png?v=12)
-
Add a button blocking function
-
Has two type of progress bar (Circle and Line)
-
Able to draw progress bar on entity
-
Able to add animations
-
Able to add props and set position of prop to ped entity
-
Able to insert images
-
Able to insert a model or create a model while loading
-
Able to block buttons during loading
-
Able to add a function when starting to load
-
Enter a function when the loading is successful
-
Enter a function When loading is possible
-
You can enter a function when loading fails. (Players press cancel)
-
Can be customized to unload when dead
-
Can change the loading tube style
-
Can add default images such as city logos
-
Useful for done with items like food, repair kit, bandage heal or etc. Upon to you customized
-
Can set key to progressbar and use export for block another event or player action by progressbar key
-
More customizable than mythic or general loading tubes
Example of code
exports['AFU.Progressbar']:create({
type = 'circle_image',
key = 'selling_lsd',
image = 'lsd.png',
description = text,
duration = time,
canCancel = false,
cancelWhenDead = true,
disableControl = {
movements = true,
mouse = true,
combat = true,
all = true
},
options = {
freeze = false,
animation = {
dict = 'missheist_agency3aig_24',
name = 'agent02_whats_wrong_left',
onlyUpper = false,
duration = 5000
},
object = {
model = 'p_gaffer_tape_s',
attachPosition = {
Bone = 6286,
Pos = vec3(0.04, -0.12, -0.04),
Rot = vec3(-78, -4, -14),
RotOrder = 0,
}
}
},
onStart = function()
-- print('started')
end,
onStop = function()
print('stopped')
end,
onCancel = function(...)
print('canceled')
end,
onSuccess = function(...)
print('success')
end,
tick = function(successCallback, cancelCallback)
-- print('tick')
end
})
Properties of progress bar
props : table
props.key : string (optional)
props.type : string (required) 'normal' | 'circle_image'
props.title : string (optional)
props.description : string (optional)
props.image : string (optional)
props.duration : number (optional)
props.drawOnEntity : entity (optional)
props.tick : function (optional)
* initial function
* successCallback : function (optional) // can pass any arguments
* cancelCallback : function (optional) // can pass any arguments
props.onStart : function (optional)
props.onStop : function (optional)
props.canCancel : boolean (optional)
props.cancelWhenDead : boolean (optional)
props.cancelWhenGetDamage : boolean (optional)
props.disableControl : table (optional)
props.disableControl : table (optional)
props.disableControl.movements : boolean (optional)
props.disableControl.mouse : boolean (optional)
props.disableControl.combat : boolean (optional)
props.disableControl.all : boolean (optional)
props.options : table (optional)
props.options.freeze : boolean (optional)
props.options.animation : table | string (optional)
props.options.animation.dict : string (required)
props.options.animation.name : string (required)
props.options.animation.onlyUpper : boolean (optional)
props.options.animation.duration : number (optional)
props.options.animation.clearImmediately : boolean (optional)
props.options.object : table (optional)
props.options.object.model : string | hash (required)
props.options.object.attachPosition : table (required)
props.options.object.attachPosition.Bone : number
props.options.object.attachPosition.Pos : vector3
props.options.object.attachPosition.Rot : vector3
props.options.object.attachPosition.RotOrder : number
Some video and images preview
Tebex | Buy this cheese!
https://away-from-us.tebex.io/package/6022187
Code is accessible | Only config |
Subscription-based | No |
Lines (approximately) | 1000+ |
Requirements | No |
Support | Yes |
![Screenshot 2023-12-05 055645 | 567x427](upload://5sNXrJb0e2kQAJrQYcyXgLlwT8L.png) |