tweak(interface/progress): invBusy state

For ox_inventory. Also removed an used table.
This commit is contained in:
Linden
2022-05-24 15:13:17 +10:00
parent 9904256bba
commit df94633998
2 changed files with 4 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ game 'gta5'
--[[ Resource Information ]]-- --[[ Resource Information ]]--
name 'ox_lib' name 'ox_lib'
author 'Linden' author 'Linden'
version '2.3.2' version '2.3.3'
repository 'https://github.com/overextended/ox_lib' repository 'https://github.com/overextended/ox_lib'
description 'A library of shared functions to utilise in other resources.' description 'A library of shared functions to utilise in other resources.'

View File

@@ -1,7 +1,7 @@
local progress local progress
local DisableControlAction = DisableControlAction local DisableControlAction = DisableControlAction
local DisablePlayerFiring = DisablePlayerFiring local DisablePlayerFiring = DisablePlayerFiring
local disable = {} local playerState = LocalPlayer.state
local function createProp(prop) local function createProp(prop)
lib.requestModel(prop.model) lib.requestModel(prop.model)
@@ -12,6 +12,7 @@ local function createProp(prop)
end end
local function startProgress(data) local function startProgress(data)
playerState.invBusy = true
progress = data progress = data
if data.anim then if data.anim then
@@ -91,8 +92,8 @@ local function startProgress(data)
end end
end end
playerState.invBusy = false
local cancel = progress == false local cancel = progress == false
table.wipe(disable)
progress = nil progress = nil
if cancel then if cancel then