Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es_extended): Add Entity Lockdown by default #1513

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. (Recommended)
-- "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
Loading