Okay, so i have a code for an npc that changes your job, but the job tab in the f4 menu is still there, how would i go about disabling it, or at the very least making it say you must talk to the npc to change job.
[URL="https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/f4menu/cl_frame.lua"]This is the code that allows opening the F4 menu.[/URL] I have no idea on how to disable it with Falco's modification system.
[code]function PANEL:Think()
self.CloseButton:SetVisible(not self.tabScroller.btnRight:IsVisible())
F4Bind = F4Bind or input.KeyNameToNumber(input.LookupBinding("gm_showspare2"))
if not F4Bind then return end
if self.F4Down and not input.IsKeyDown(F4Bind) then
self.F4Down = false
return
elseif not self.F4Down and input.IsKeyDown(F4Bind) then
self.F4Down = true
self:Hide()
end
end
hook.Add("PlayerBindPress", "DarkRPF4Bind", function(ply, bind, pressed)
if string.find(bind, "gm_showspare2", 1, true) then
F4Bind = input.KeyNameToNumber(input.LookupBinding(bind))
end
end)[/code]
[QUOTE=code_gs;45371427][URL="https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/f4menu/cl_frame.lua"]This is the code that allows opening the F4 menu.[/URL] I have no idea on how to disable it with Falco's modification system.
[code]function PANEL:Think()
self.CloseButton:SetVisible(not self.tabScroller.btnRight:IsVisible())
F4Bind = F4Bind or input.KeyNameToNumber(input.LookupBinding("gm_showspare2"))
if not F4Bind then return end
if self.F4Down and not input.IsKeyDown(F4Bind) then
self.F4Down = false
return
elseif not self.F4Down and input.IsKeyDown(F4Bind) then
self.F4Down = true
self:Hide()
end
end
hook.Add("PlayerBindPress", "DarkRPF4Bind", function(ply, bind, pressed)
if string.find(bind, "gm_showspare2", 1, true) then
F4Bind = input.KeyNameToNumber(input.LookupBinding(bind))
end
end)[/code][/QUOTE]
I don't want the entire f4 menu disabled, i just want the jobs tab disabled.