Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- --// gm_abanoned by Kit Kettle http://steamcommunity.com/sharedfiles/filedetails/?id=336232506
- print("// Loaded gm_abandoned fixer //")
- local function fixStupid()
- local mapName = "gm_abandoned"
- local stupidTriggerName = "lights"
- local stupidCount = 0
- if string.sub( game.GetMap( ), 1, string.len(mapName) ) == mapName then
- print("Nuking stupid ass entities")
- for k, ent in pairs( ents.GetAll() ) do
- local name = string.lower( ent:GetName() )
- local class = string.lower( ent:GetClass() )
- if class == "lua_run" or name == "disconnectcmd" or name == "limits" or name == "disablenoclip" then
- print("Got ourselves a lua_run")
- ent:Remove()
- stupidCount = stupidCount + 1
- elseif class == "logic_timer" then
- print("Whats this? A logic_timer!")
- ent:Remove()
- stupidCount = stupidCount + 1
- elseif class == "point_clientcommand" or class == "point_servercommand" then
- print("No console commands will ever be run")
- ent:Remove()
- stupidCount = stupidCount + 1
- elseif string.sub( name, 1, string.len(stupidTriggerName)) == stupidTriggerName then
- print("Triggers that 'keep' you in the map? NOPE")
- ent:Remove()
- stupidCount = stupidCount + 1
- end
- end
- PrintMessage( HUD_PRINTTALK, "*Beep boop* Deleted "..stupidCount.." stupid entities by Kit Kettle, remember to tip your waiter")
- end
- end
- hook.Add("InitPostEntity", "gm_abandoned_fix", function()
- fixStupid()
- end)
- concommand.Add("gm_abandoned_fix", function()
- fixStupid()
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement