Spawning brushes with LUA

How can I spawn a custom brush that I have created and be able to set the texture, height, width and depth.

You can’t unless you make a SENT for it.

I have, I’ve created a custom brush that removes all props in it. I just need to know how to spawn it with LUA at map load.

Well you could spawn it with ents.Create(“SENT NAME HERE”) http://wiki.garrysmod.com/?title=Ents.Create
and on a hook using this
http://wiki.garrysmod.com/?title=Gamemode.Initialize

If you don’t know, don’t fucking reply and pretend you know anything about it.

You can’t create brushes in-game, period. The only thing you can do is spawn brush entities which use the same geometry as another brush entity which already exists in the map, and that’s not what you need.

If you want your brush to be there since the beginning, the only way to do that is to add it in your map using Hammer, whenever you turn a block into a brush entity, just enter the name of your custom brush in the combo box instead of selecting one of the existing brush entities.

Maybe this http://wiki.garrysmod.com/page/GM/PostCleanupMap ?

[editline]21st April 2015[/editline]

5 years ago)) https://forums.alliedmods.net/showthread.php?t=129597 ?

The hook isn’t really relevant to when I would of needed the brush to be created, and the second article only applies to Source C++ modding unfourtunetly.

What did you end up doing?