Skip to content

Commit

Permalink
feat(es_extended): Add Entity Lockdown by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Mycroft-Studios committed Nov 27, 2024
1 parent 2bfd7ef commit c9ff38f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions [core]/es_extended/server/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions [core]/es_extended/shared/config/adjustments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c9ff38f

Please sign in to comment.