This repository was archived by the owner on Apr 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ exports('openInventory', OpenInventory)
135135
136136local function useItem (data , cb )
137137 if invOpen and data .close then TriggerEvent (' ox_inventory:closeInventory' ) end
138- if not invBusy and not Interface .ProgressActive and not IsPedRagdoll (cache .ped ) and not IsPedFalling (cache .ped ) then
138+ if not invBusy and not PlayerData . dead and not Interface .ProgressActive and not IsPedRagdoll (cache .ped ) and not IsPedFalling (cache .ped ) then
139139 if currentWeapon and currentWeapon ?.timer > 100 then return end
140140
141141 invBusy = true
@@ -164,7 +164,7 @@ local function useItem(data, cb)
164164 prop = data .prop ,
165165 propTwo = data .propTwo
166166 }, function (cancel )
167- p :resolve (cancel )
167+ p :resolve (PlayerData . dead or cancel )
168168 end )
169169 end
170170
@@ -186,7 +186,7 @@ local function useItem(data, cb)
186186 end
187187
188188 if cb then cb (result ) end
189- Wait (500 )
189+ Wait (200 )
190190 plyState .invBusy = false
191191 return
192192 end
@@ -200,7 +200,7 @@ AddEventHandler('ox_inventory:item', useItem)
200200exports (' useItem' , useItem )
201201
202202local function useSlot (slot )
203- if PlayerData .loaded and not invBusy and not Interface .ProgressActive then
203+ if PlayerData .loaded and not PlayerData . dead and not invBusy and not Interface .ProgressActive then
204204 local item = PlayerData .inventory [slot ]
205205 if not item then return end
206206 local data = item and Items [item .name ]
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ game 'gta5'
77--[[ Resource Information ]] --
88name ' ox_inventory'
99author ' Overextended'
10- version ' 2.5.6 '
10+ version ' 2.6.0 '
1111repository ' https://github.com/overextended/ox_inventory'
1212description ' Slot-based inventory with metadata'
1313
You can’t perform that action at this time.
0 commit comments