F4 Menu in DarkRP Server will not work

F4 Menu in DarkRP Server will not work - Queue waiting for Asian food counter in restaurant

I am creating a DarkRP server with the latest version of Garry's Mod. I am attempting to enable and use the default jobs on the server, but I get this error in the client console whenever I press F4:

[DarkRP] gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23: attempt to index local 'jobTable' (a nil value)
  1. Call - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23
   2. unknown - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:62

This is the cl_gamemode_functions.lua file:

local GUIToggled = false
local mouseX, mouseY = ScrW() / 2, ScrH() / 2
function GM:ShowSpare1()
    local jobTable = LocalPlayer():getJobTable()

    if jobTable.ShowSpare1 then
        return jobTable.ShowSpare1(LocalPlayer())
    end

    GUIToggled = not GUIToggled

    if GUIToggled then
        gui.SetMousePos(mouseX, mouseY)
    else
        mouseX, mouseY = gui.MousePos()
    end
    gui.EnableScreenClicker(GUIToggled)
end

function GM:ShowSpare2()
    local jobTable = LocalPlayer():getJobTable()

    if jobTable.ShowSpare2 then
        return jobTable.ShowSpare2(LocalPlayer())
    end

    DarkRP.toggleF4Menu()
end

function GM:PlayerStartVoice(ply)
    if ply == LocalPlayer() then
        ply.DRPIsTalking = true
        return -- Not the original rectangle for yourself! ugh!
    end
    self.Sandbox.PlayerStartVoice(self, ply)
end

function GM:PlayerEndVoice(ply)
    if ply == LocalPlayer() then
        ply.DRPIsTalking = false
        return
    end

    self.Sandbox.PlayerEndVoice(self, ply)
end

function GM:OnPlayerChat()
end

local FKeyBinds = {
    ["gm_showhelp"] = "ShowHelp",
    ["gm_showteam"] = "ShowTeam",
    ["gm_showspare1"] = "ShowSpare1",
    ["gm_showspare2"] = "ShowSpare2"
}

function GM:PlayerBindPress(ply, bind, pressed)
    self.Sandbox.PlayerBindPress(self, ply, bind, pressed)

    local bnd = string.match(string.lower(bind), "gm_[a-z]+[12]?")
    if bnd and FKeyBinds[bnd] then
        hook.Call(FKeyBinds[bnd], GAMEMODE)
    end

    if not self.Config.deadvoice and not ply:Alive() and string.find(string.lower(bind), "voicerecord") then return true end
end

function GM:InitPostEntity()
    hook.Call("teamChanged", GAMEMODE, GAMEMODE.DefaultTeam, GAMEMODE.DefaultTeam)
end

function GM:teamChanged(before, after)
end

local function OnChangedTeam(um)
    local oldTeam, newTeam = um:ReadShort(), um:ReadShort()
    hook.Call("teamChanged", GAMEMODE, oldTeam, newTeam) -- backwards compatibility
    hook.Call("OnPlayerChangedTeam", GAMEMODE, LocalPlayer(), oldTeam, newTeam)
end
usermessage.Hook("OnChangedTeam", OnChangedTeam)

timer.Simple(0, function() GAMEMODE.ShowTeam = DarkRP.openKeysMenu end)





Pictures about "F4 Menu in DarkRP Server will not work"

F4 Menu in DarkRP Server will not work - Cheerful American African waitress in apron working on counter monitor while registering order at cozy cafe
F4 Menu in DarkRP Server will not work - Coffee Brown Signage
F4 Menu in DarkRP Server will not work - Person Cooking Inside Kitchen



How do I disable default DarkRP F4 menu?

Navigate to our Game Panel and proceed to login. Click on the Game Services button and if prompted select the server you would like to disable the default F4 menu on. Navigate to the File Manager. Navigate to the garrysmod/addons/darkrpmodification/lua/darkrp_config and proceed to edit the disabled_defaults.

How do you edit jobs in DarkRP?

Method (Game Panel)
  • Navigate to the Game Panel and proceed to login.
  • Click on Game Services button and if prompted select the server you would like to change the default DarkRP job of.
  • Navigate to the File Manager.
  • Navigate to the garrysmod/addons/darkrpmodification/lua/darkrp_customthings and proceed to edit the jobs.


  • How do I add a server to DarkRP?

    You can do this by following these steps:
  • Navigate to DarkRP's GitHub page.
  • Click the green Code button, then Download ZIP.
  • Extract the files into a directory called darkrp to a familiar location like your Desktop.
  • Using an FTP, navigate to garrysmod/gamemodes .
  • Upload the folder darkrp to the above FTP directory.


  • What is a DarkRP server?

    DarkRP is a non-serious roleplay gamemode developed by FPtje (Falco Peijnenburg) over the course of the last 8 years, over this time it has grown into one of, if not the biggest gamemode in all of Garry's Mod. The downtown map for DarkRP.



    DarkRP F4 Menu Tutorial - Part 1 - File Setup/Functions




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Darya Sannikova, Andrea Piacquadio, Clem Onojeghuo, Huy Phan