• Adding new darkrp f4 tab issue
    0 replies, posted
UPDATED: Ok so now I got it to the point of no errors using common sense, but now the tab just doesn't show up. Any reason why? ALL help and answers are appreciated to the max. Here is the f4 menu code: [CODE]--[[--------------------------------------------------------------------------- F4 menu tab modification module. ---------------------------------------------------------------------------]] local function createF4MenuTab() -- DarkRP.switchTabOrder(2, 3) -- Remove the "--" in this line if you want to move the third tab to the left of the second tab! -- DarkRP.removeF4MenuTab("Ammo") -- Remove the "--" in this line if you want to remove the Ammo tab! local leveltab = vgui.Create("DPanelList") leveltab:EnableVerticalScrollbar( true ) function leveltab:Update() self:Clear(true) local frame = vgui.Create( "DPanel", leveltab ) frame:SetPos( 5, 5 ) -- Set the position for the menu to pop up at frame:SetSize( 750, 550 ) -- Make the second number bigger for a longer list, only if your a dev whos adding more skills. frame.Paint = function() local ply = LocalPlayer() draw.SimpleText( "Level: " .. ply:GetNWInt( "Level" ), "ChatFont", 0, 5, Color( 255, 255, 255 ) ) draw.SimpleText( "Experience: " .. ply:GetNWInt( "EXP" ), "ChatFont", 0, 20, Color( 255, 255, 255 ) ) draw.SimpleText( "Skillpoints: " .. ply:GetNWInt( "SkillPoints" ), "ChatFont", 0, 35, Color( 255, 255, 255 ) ) end local CategoryList = vgui.Create( "DPanelList", leveltab ) CategoryList:SetSize( 745, 550 ) CategoryList:SetPos( 0, 60 ) CategoryList:SetAutoSize( true ) CategoryList:SetSpacing( 5 ) CategoryList:EnableHorizontal( false ) CategoryList:EnableVerticalScrollbar( true ) CategoryContentOne = vgui.Create( "DButton" ) CategoryContentOne:SetText( "Max Hp (Current: "..LocalPlayer():GetNWInt("Skill_HP")..")" ) CategoryContentOne.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill1buy") end CategoryList:AddItem( CategoryContentOne ) CategoryContentTwo = vgui.Create( "DButton" ) CategoryContentTwo:SetText( "Max Armor (Current: "..LocalPlayer():GetNWInt("Skill_ARMOR")..")" ) CategoryContentTwo.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill2buy") end CategoryList:AddItem( CategoryContentTwo ) CategoryContentThree = vgui.Create( "DButton" ) CategoryContentThree:SetText( "Hp Regen (Current: "..LocalPlayer():GetNWInt("Skill_REGEN")..")" ) CategoryContentThree.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill3buy") end CategoryList:AddItem( CategoryContentThree ) CategoryContentThree2 = vgui.Create( "DButton" ) CategoryContentThree2:SetText( "Armor Regen (Current: "..LocalPlayer():GetNWInt("Skill_ARMREGEN")..")" ) CategoryContentThree2.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill4buy") end CategoryList:AddItem( CategoryContentThree2 ) CategoryContentFour = vgui.Create( "DButton" ) CategoryContentFour:SetText( "Jump Height (Current: "..LocalPlayer():GetNWInt("Skill_JUMP")..")" ) CategoryContentFour.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill5buy") end CategoryList:AddItem( CategoryContentFour ) CategoryContentFive = vgui.Create( "DButton" ) CategoryContentFive:SetText( "Damage Resistance (Current: "..LocalPlayer():GetNWInt("Skill_RESIST")..")" ) CategoryContentFive.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill6buy") end CategoryList:AddItem( CategoryContentFive ) CategoryContentSix = vgui.Create( "DButton" ) CategoryContentSix:SetText( "Speed (Current: "..LocalPlayer():GetNWInt("Skill_SPEED")..")" ) CategoryContentSix.DoClick = function() surface.PlaySound( "ui/buttonclick.wav" ) RunConsoleCommand("skill7buy") end CategoryList:AddItem( CategoryContentSix ) leveltab:Update() return leveltab end end hook.Add("F4MenuTabs", "MyCustomF4MenuTab", createF4MenuTab)[/CODE] [B]**I am using the latest darkrp version and yes i am putting the file in right spot, sadly i am getting no lua errors**[/B] -Facepunch's community is amazing and I thank all replies in advanced!
Sorry, you need to Log In to post a reply to this thread.