1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Need help disabling Q menu

Discussion in 'Modder General Chat' started by Solarmender, Dec 8, 2018 at 7:21 PM.

  1. Solarmender

    Solarmender New Member

    Hello. I need to disable the q spawn menu for everyone except admins and superadmins. I am using ulx and I have tried several scripts online but none of them help. Any help is appreciated. Thanks!
     
  2. # VALERY

    # VALERY Member

    Code (Text):
    function BlockContextMenu()
        return table.HasValue({"specadmin", "superadmin"}, LocalPlayer():GetNWString("usergroup"))
    end

    hook.Add("ContextMenuOpen", "BlockContextMenu", BlockContextMenu)
    This is clientside fuction. So you have to put this in cl_ file (for example darkrp_modules/contextmenu/cl_contextmenu.lua)
     
  3. Solarmender

    Solarmender New Member

    Not the Context Menu. The spawn menu where you spawn in props. I tried your script too and put it in the modules but it didnt do anything
     
  4. # VALERY

    # VALERY Member

    Code (Text):
    function BlockSandboxMenu()
        return table.HasValue({"specadmin", "superadmin"}, LocalPlayer():GetNWString("usergroup"))
    end

    hook.Add("OnSpawnMenuOpen", "BlockSandboxMenu", BlockSandboxMenu)
     

Share This Page