Banning Props from spawning

Hey guys, I got a little question…
I’m making my own gamemode, and I want to ban like… ALL props, except the wooden ones, is there any command to let props not spawn if you click them, but it does for wooden? Or you need to do it like manually typing all models like:
“models/props_c17/oildrum001_explosive.mdl”,
“models/props_junk/trashdumpster02.mdl”,
“models/props_phx/ball.mdl”,
“models/props_phx/amraam.mdl”,
“models/props_phx/mk-82.mdl”,
“models/props_phx/oildrum001_explosive.mdl”,
“models/props_phx/ww2bomb.mdl”,
“models/props_phx/torpedo.mdl”,
“models/props_phx/misc/flakshell_big.mdl”,
“models/props_phx/cannonball.mdl”,
“models/props_phx/misc/smallcannonball.mdl”,
“models/props_junk/propane_tank001a.mdl”,
“models/props_junk/gascan001a.mdl”}
Best Regards,
Staneh.

If your using sandbox as a base then use
**[Gamemode.PlayerSpawnProp

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerSpawnProp)**

Also has a nice example to do what you want

You should check if it’s on the whitelist, not blacklist.

Sorry for not being specific, but i’m actually making my own gamemode, so, I guess that wont work?

[lua]
local models = { “models/props_c17/oildrum001_explosive.mdl”,
“models/props_junk/trashdumpster02.mdl”,
“models/props_phx/ball.mdl”,
“models/props_phx/amraam.mdl”,
“models/props_phx/mk-82.mdl”,
“models/props_phx/oildrum001_explosive.mdl”,
“models/props_phx/ww2bomb.mdl”,
“models/props_phx/torpedo.mdl”,
“models/props_phx/misc/flakshell_big.mdl”,
“models/props_phx/cannonball.mdl”,
“models/props_phx/misc/smallcannonball.mdl”,
“models/props_junk/propane_tank001a.mdl”,
“models/props_junk/gascan001a.mdl” }

local function blockProps( ply, mdl )
for _, v in pairs( models ) do
if string.find( mdl, v ) then
return false
end
end
end
hook.Add( “PlayerSpawnProp”, “blockProps”, blockProps )[/lua]
:science:

He is making his own gamemode, that hook doesn’t exist outside of sandbox…

[editline]05:57PM[/editline]

If you aren’t using sandbox, how are the players spawning the props? If you have your own system and gui then you can do this easily yourself without any hooks.

You can make entities for your own props to spawn, or DeriveGamemode(“sandbox”) then add it.

Then use a whitelist to check in your prop spawning code

snip

Doesn’t help.