mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-19 10:28:33 +00:00
fix(cache): ped not triggering update event
This commit is contained in:
1 parent
6b8b7990c8
commit
cdc7523146
1 file changed
+1
-8
Vendored
+1
-8
@@ -1,12 +1,5 @@
|
||||
local cache = {}
|
||||
|
||||
function cache:getPed()
|
||||
local ped = PlayerPedId()
|
||||
if ped ~= self.ped then
|
||||
self.ped = ped
|
||||
end
|
||||
end
|
||||
|
||||
function cache:getVehicle()
|
||||
local vehicle = GetVehiclePedIsIn(self.ped, false)
|
||||
if vehicle > 0 then
|
||||
@@ -51,7 +44,7 @@ end
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
cache:getPed()
|
||||
cache:set('ped', PlayerPedId())
|
||||
cache:getVehicle()
|
||||
|
||||
-- if not cache.vehicle then
|
||||
|
||||
Reference in new issue
Block a user