Skip to content

Commit

Permalink
fix: constant errors in f8
Browse files Browse the repository at this point in the history
- upped the time for entities to exsist which should help a little in the very rare instances of errors
  • Loading branch information
FjamZoo committed Mar 3, 2024
1 parent 77e22b7 commit bc83b54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ local function stateBagWrapper(keyFilter, cb)

local loaded = netId and lib.waitFor(function()
if NetworkDoesEntityExistWithNetworkId(netId) then return true end
end, 'Timeout while waiting for entity to exist', 1500)
end, 'Timeout while waiting for entity to exist', 5000)

local entity = loaded and NetToVeh(netId)

Expand Down Expand Up @@ -164,7 +164,6 @@ local policeLights = lib.addKeybind({
-- Police Horns --

local restoreSiren = 0
local didSiren = false

stateBagWrapper('horn', function(veh, value)
local relHornId = hornVehicles[veh]
Expand Down Expand Up @@ -308,11 +307,11 @@ lib.addKeybind({
if cache.vehicle then
SetTimeout(0, function()
local state = Entity(cache.vehicle).state

if state.sirenMode > 0 then
state:set('sirenMode', 0, true)
end

Rpressed = false
end)
end
Expand Down

0 comments on commit bc83b54

Please sign in to comment.