From c9ff38f9c4aaf578570d90c0af4193bda7ac9b5a Mon Sep 17 00:00:00 2001 From: Kasey FItton Date: Wed, 27 Nov 2024 23:57:47 +0000 Subject: [PATCH] feat(es_extended): Add Entity Lockdown by default --- [core]/es_extended/server/common.lua | 8 ++++++++ [core]/es_extended/shared/config/adjustments.lua | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index edbc39529..53e7c1601 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -65,3 +65,11 @@ RegisterNetEvent("esx:ReturnVehicleType", function(Type, Request) end) GlobalState.playerCount = 0 + +if Config.EntityLockdown.affectedBuckets > 0 then + for i=0, Config.EntityLockdown.affectedBuckets do + SetRoutingBucketEntityLockdownMode(i, Config.EntityLockdown.mode) + end +else + SetRoutingBucketEntityLockdownMode(0, Config.EntityLockdown.mode) +end diff --git a/[core]/es_extended/shared/config/adjustments.lua b/[core]/es_extended/shared/config/adjustments.lua index ae7b8a466..b7c47e48c 100644 --- a/[core]/es_extended/shared/config/adjustments.lua +++ b/[core]/es_extended/shared/config/adjustments.lua @@ -34,6 +34,18 @@ Config.RemoveHudComponents = { [22] = false, --HUD_WEAPONS } + +----------------------------------------------------------- +-- Modes: +-- "strict" = No entities can be created by clients at all. +-- "relaxed" = Only script-owned entities created by clients are blocked. +-- "inactive" = Clients can create any entity they want. +----------------------------------------------------------- +Config.EntityLockdown = { + mode = "strict", + affectedBuckets = 0, -- Set to 0 for default bucket, setting higher, will block buckets 0-value +} + -- Pattern string format --1 will lead to a random number from 0-9. --A will lead to a random letter from A-Z.