cant get it to work on a certain script
Closed this issue · 4 comments
so usually atleast for every other resource ive been able to get it to work but this one script is being jankey
this is the code
if not unit then
drug = true
exports['mythic_progbar']:Progress({
name = "coke",
duration = 10000,
label = 'Coke Started to Form',
useWhileDead = false,
canCancel = true,
controlDisables = {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
},
animation = {
animDict = "mp_arresting",
anim = "a_uncuff",
flags = 49,
},
}, function(cancelled)
if not cancelled then
TriggerServerEvent('coke')
weed = false
else
end
end)
end
end)
ive tried making it
if not unit then
drug = true
exports.rprogress:Start({
name = "coke",
duration = 10000,
label = 'Coke Started to Form',
ive also tried
if not unit then
drug = true
exports.rprogress:Start("Coke Started to Form", 10000)
but nothing can get it to work, the closet ive gotten was with my first solution but i get an error No such export ShowNotification in resource FeedM2 any help would be appriciated, i know this isnt an issue necesarilly but if you could point me in the right direction because ive never seen a script run it like this thank you
The Start()
method just takes text
and duration
parameters:
exports.rprogress:Start(text, duration)
You need to use the Custom()
method instead:
exports.rprogress:Custom({
Async = true,
x = 0.5,
y = 0.5,
From = 0,
To = 100,
Duration = 1000,
Radius = 60,
Stroke = 10,
MaxAngle = 360,
Rotation = 0,
Easing = "easeLinear",
Label = "My Custom Label",
LabelPosition = "right",
Color = "rgba(255, 255, 255, 1.0)",
BGColor = "rgba(0, 0, 0, 0.4)",
Animation = {
scenario = "WORLD_HUMAN_AA_SMOKE",
animationDictionary = "missheistfbisetup1",
animationName = "unlock_loop_janitor",
},
DisableControls = {
Mouse = true,
Player = true,
Vehicle = true
},
onStart = function()
-- do something when progress starts
end,
onComplete = function()
-- do something when progress is complete
end
})
Ahh i see, now i notice ot says animation directory? Ine nevee actually used animations is there a certain place i have to get animations from?
Animation List: https://alexguirre.github.io/animations-list/
or
Scenario List: https://pastebin.com/6mrYTdQv
Alright, thank you so much!