• Disallowing Prop Spawning from Console
    4 replies, posted
I've been working on a whitelist system for props, so that players can only spawn props that are on a list. I've got that part relatively down pat, but the system is completely useless if people can just spawn props though the console and not through the spawnmenu. The "PlayerSpawnProp" hook only seems to work when props are spawned from the menu and concommand.Remove( "gm_spawn" ) seems to have no effect. What would be the best way to stop people from spawning certain props through console?
This is tested and working, although blocking gm_spawn will not allow ANYTHING to be spawned so its kind of pointless unless that's what you want. concommand.Add( "gm_spawn", function() return false end )
The menu just runs the console command, so PlayerSpawnProp should work. Are you returning false to not allow them to spawn?
You sure they aren't spawning SENTs? [lua] local function spawnfilter(ply, model) return false end local function spawnfiltersent(ply, ent) return false end hook.Add("PlayerSpawnProp", "Bleh", spawnfilter) hook.Add("PlayerSpawnSENT", "Bleh", spawnfiltersent) hook.Add("PlayerSpawnEffect", "Bleh", spawnfilter) [/lua] should work
Override the gm_spawn command to check if the model is included in your whitelist??
Sorry, you need to Log In to post a reply to this thread.