Remove map props

How do i make it so when the server starts up it removes all the map entities i have specified?

Such as the 4 doors for nexus entrance in evocity

*141
*142
*63
*140

Theres an Permanent World Prop remover tool on the workshop, easiest way :stuck_out_tongue:

Depends on what you want. If you want to remove for example all the doors on a map.
You would use a hook for when the entities are initialized and then use a loop to remove all doors.



hook.Add("InitPostEntity","remove_all_doors",function()
for k,v in pairs(ents.FindByClass("prop_physics")) do -- Not sure if it's prop_physics
if v:GetModel() == "a_door_model.mdl" then -- Find yourself the models for doors.
v:Remove()
end
end
end)


If you want to remove specifics entities like you said, you would first.
1.Find the ID of those doors (Look at the door you want to remove then use this code):


print(Entity(1):GetEyeTrace().Entity)

It shoulds end up with somethings like: [XX] prop_physics
Note you can use PrintTable() for get the model of the door (for method 1)
2.With the ID of the doors you got, use the same methods as above but instead of removing all:



hook.Add("InitPostEntity","remove_all_doors",function()
Entity(XX):Remove()
Entity(XX):Remove()
end)


-snip- nevermind

Thanks, i will try something when i get home.

Would there be any way to make a simple list?

And would this work?




hook.Add("InitPostEntity","remove_all_doors",function()
Entity(*141):Remove()
Entity(*142):Remove()
end)
 

No, you cant insert there *.

You can create table, but it will just be more coding. You should go with what Gedo789 said.

Isn’t it prop_door_rotating?