Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "KeyPress", "keypress_use_hi", function( ply, key )
- if ( key == IN_USE ) then
- local function CheckBadEnt(ent)
- if not IsValid(ent) then return end
- local name = ent:GetClass()
- if ( name == "ambient_generic" or name == "env_soundscape" or name == "env_soundscape_triggerable" ) then
- timer.Simple(0, function() ent:Remove() end)
- end
- return
- end
- end
- end )
- hook.Add( "InitPostEntity", "RemoveSounds", function()
- for _, ent in ipairs( ents.GetAll() ) do
- CheckBadEnt(ent)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement