Skip to content
Merged
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
30 changes: 30 additions & 0 deletions lua/map_scripts/maps/gm_vacant_industry_revamped.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local entIds = {
2725, -- color correction
2716, -- high quality snowfall
2729, -- toggle skybox
2696, -- disable smog
2698, -- fps mode
2701, -- disable snow
2889, -- sandbox mode button!!!
2902, -- shake
2718, -- fast
}

local buttonClass = "func_button"

hook.Add( "CFC_MapScripts_PostMapEntsSpawn", "CFC_MapScripts_vacant_removeadminbuttons", function()
local removedEnts = 0
for _, entId in ipairs( entIds ) do
local ent = ents.GetMapCreatedEntity( entId )
if not IsValid( ent ) then
ErrorNoHaltWithStack( "Admin button removal: Couldn't find map ent " .. entId )
continue
end
if ent:GetClass() ~= buttonClass then
ErrorNoHaltWithStack( "Admin button removal: Map entity " .. entId .. " is not a button!" )
continue
end
removedEnts = removedEnts + 1
SafeRemoveEntity( ent )
end
end )