Replacing Map models with Entities

Is there any way to delete or replace map placed models and replace them with your own version, which is an entity?

I tried using:

[lua]
for _, ent in pairs(ents.GetAll()) do
if (ent:GetModel() == “models/env/misc/bank_atm/bank_atm.mdl”) then
ent:Remove()
end
end
[/lua]

But it only removed the entity versions and not the map versions. I wasn’t sure to post this in the lua or mapping forum but since it involves lua coding I figured i’d post it here.

I’m not sure what you mean under “map versions” and “entity versions”, but as far as I know static props (which usually make up most of the map) are unremovable, and the effect you are trying to achieve can’t be achieved with just Lua.

Ah, cause the built in models into the map are static. I’ll find another solution, thanks anyway!

Take the entities and place them where the ATM machines are, then just hide the entities.

Still wont work with static props, they aren’t entities when the map is compiled, just part of the world.

Edit: Oh sorry, didn’t get what you meant there.

I can probably do the opposite though, make the entity invisible and slightly bigger and place it over the static model.