ps progressbar support

This commit is contained in:
Jim Shield
2022-08-30 22:45:59 +01:00
committed by GitHub
parent 00332d0ca3
commit 9fcc91e2bc
3 changed files with 7 additions and 5 deletions

View File

@@ -66,11 +66,13 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^2Playing Animation^7...") end
loadAnimDict(animDict)
TaskPlayAnim(PlayerPedId(), animDict, anim, 1.0, 1.0, -1, MovementType, 0, 0, 0, 0)
if Config.UseProgbar then
QBCore.Functions.Progressbar('jimmy_consume_', string..QBCore.Shared.Items[itemName].label.."..", time, false, false, {disableMovement = false,disableCarMovement = false,disableMouse = false,disableCombat = true,}, {}, {}, {}, function()end)
QBCore.Functions.Progressbar('jimmy_consume_', string..QBCore.Shared.Items[itemName].label.."..", time, false, false, {disableMovement = false,disableCarMovement = false,disableMouse = false,disableCombat = true,}, {}, {}, {}, function() end, function() end, itemName)
else
triggerNotify(nil, string..QBCore.Shared.Items[itemName].label.."..", "success")
end
consuming = true
CreateThread(function()
--Prop Spawning