Removing all props on a map

Hey all,

i was wondering if there was a way to remove all the default props in a map?

Thanks


sv_cheats 1; ent_remove_all prop_physics; ent_remove_all prop_static;

or


lua_run for v in ents.FindByClass("prop_physics") do v:Remove() end for v in ents.FindByClass("prop_static") do v:Remove() end

that should work I think


lua_run for _,v in ents.FindByClass("prop_*") do v:Remove() end 

where would i placed



lua_run for _,v in ents.FindByClass("prop_*") do v:Remove() end


That’s a console command, so I guess you could put it in a cfg. Otherwise just remove the “lua_run” part and place it in a serverside lua file.

It depends how and when you want it to be executed, you can hook it to execute via command or action.

Once created, you can place it in the server-side LUA autorun folder.