mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-27 05:04:44 +00:00
refactor(resource/cache): update seat cache on vehicle change (#679)
This commit is contained in:
1 parent
aebef6d7de
commit
2b10e77622
1 file changed
+4
Vendored
+4
@@ -26,6 +26,10 @@ CreateThread(function()
|
|||||||
local vehicle = GetVehiclePedIsIn(ped, false)
|
local vehicle = GetVehiclePedIsIn(ped, false)
|
||||||
|
|
||||||
if vehicle > 0 then
|
if vehicle > 0 then
|
||||||
|
if vehicle ~= cache.vehicle then
|
||||||
|
cache:set('seat', false)
|
||||||
|
end
|
||||||
|
|
||||||
cache:set('vehicle', vehicle)
|
cache:set('vehicle', vehicle)
|
||||||
|
|
||||||
if not cache.seat or GetPedInVehicleSeat(vehicle, cache.seat) ~= ped then
|
if not cache.seat or GetPedInVehicleSeat(vehicle, cache.seat) ~= ped then
|
||||||
|
|||||||
Reference in new issue
Block a user