• Disable Spawn using Toolgun for Users
    6 replies, posted
Hello, I was wondering if anyone has figured out a way to make it so in the Q Menu, when you right click a Prop, it doesn't allow the use of "Spawn using Toolgun" unless you are an admin? Thanks!
disable the "creator" tool using whatever ädmin mod or the cantool hook.
I'm using this code, but even though I am superadmin; I can still spawn props using the tool gun. What did I do wrong? function GM:CanTool( ply, tr, tool ) if tool == "creator" and ply:IsSuperAdmin() then return false end end
Well that’s because it’s a SANDBOX hook, not a GM hook.
Sorry, a bit new to Lua. If you are not running Sandbox mode, then the CanTool hook won't work?
Sandbox or sandbox-derived gamemodes, such as DarkRP, etc. If you have the spawnmenu, like you've stated, it should work.
Unless you are creating a gamemode, use hook.Add with the "CanTool" event.
Sorry, you need to Log In to post a reply to this thread.