diff --git a/server/entities.lua b/server/entities.lua index 98fc09d..7ccf8f3 100644 --- a/server/entities.lua +++ b/server/entities.lua @@ -1,3 +1,8 @@ +local bucketLockDownMode = GetConvar('qbx:bucketlockdownmode', 'relaxed') + +-- If you want to blacklist peds and vehicles from certaiin locations utilize Car gens ymaps as done in streams/car_gen_disablers, as entityCreating handler is very expensive compared to ymap. +if bucketLockDownMode == 'inactive' then return end + -- Blacklisting entities can just be handled entirely server side with onesync events -- No need to run coroutines to supress or delete these when we can simply delete them before they spawn AddEventHandler('entityCreating', function(handle) @@ -6,4 +11,4 @@ AddEventHandler('entityCreating', function(handle) if Config.BlacklistedVehs[entityModel] or Config.BlacklistedPeds[entityModel] then CancelEvent() end -end) \ No newline at end of file +end)