How would I go about disabling the spawning of SENTs, SWEPs, and NPCs?

As the title states, I’m making a new gamemode (derived from sandbox), and I want people to be able to use the prop menu, but not be able to spawn SENTs, SWEPs, or NPCs.

Could somebody explain how I would do this?

[lua]hook.Add(“PlayerSpawnSENT”,“RestrictSENTS”,function(ply,ent) return ply:IsAdmin() end)
hook.Add(“PlayerSpawnNPC”,“RestrictSENTS”,function(ply,ent) return ply:IsAdmin() end)[/lua]

That’s generally how you do it. You return true to allow, false to disallow. In this case, it always returns false if they’re not an admin, and true if they are. You can change what it returns based on how you want to distinguish between players who can and can’t spawn stuff (and there’s no PlayerSpawnSWEP hook; that’s included in the PlayerSpawnSENT).