mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-11 08:43:55 +00:00
feat(resource/cache): cache.weapon (#151)
This commit is contained in:
1 parent
306b7b3670
commit
504447320f
1 file changed
+5
Vendored
+5
@@ -13,6 +13,7 @@ end
|
||||
local GetVehiclePedIsIn = GetVehiclePedIsIn
|
||||
local GetPedInVehicleSeat = GetPedInVehicleSeat
|
||||
local GetVehicleMaxNumberOfPassengers = GetVehicleMaxNumberOfPassengers
|
||||
local GetCurrentPedWeapon = GetCurrentPedWeapon
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
@@ -37,6 +38,10 @@ CreateThread(function()
|
||||
cache:set('seat', false)
|
||||
end
|
||||
|
||||
local hasWeapon, currentWeapon = GetCurrentPedWeapon(ped, true)
|
||||
|
||||
cache:set('weapon', hasWeapon and currentWeapon or false)
|
||||
|
||||
Wait(100)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in new issue
Block a user