Adding a extra Tab to Dark Rp menu

I have tryed to add a extra tab to darkrp but then my F4 menu will not show.
And it was supposed to be a simple tab with some text.
I added this

[lua]
ShowTeamTabs.lua

local testtablabel = vgui.create(“DLabel”)
self.Label:SetText( “Test” )

Under citizen options

cl_vgui.lua

F4MenuTabs:AddSheet(“Testtab”, F4Tabs[5], “gui/silkicons/plugin”, false, false)

local function TestTabVGUI()
if not F4Menu or not F4Menu:IsValid() then
	F4Menu = vgui.Create("DFrame")
	F4Menu:SetSize(770, 580)
	F4Menu:Center()
	F4Menu:SetVisible( true )
	F4Menu:MakePopup( )
	F4Menu:SetTitle("Test menu")
	F4Tabs = {MoneyTab(), JobsTab(), EntitiesTab(), RPHUDTab(), Testtab()}
	if LocalPlayer():IsAdmin() then
		table.insert(F4Tabs, RPAdminTab())

[/lua]

I wondered if anyone could help me.

Firstly, use [lua] tags please.

Also, in showteamtabs.lua, do this underneath everything:

[lua]
function Testtab()

local testtablabel = vgui.create("DLabel")
testtablabel:SetText( "Test" )

end
[/lua]

Also remove the “local function TestTabVGUI()” bit.

Thanks for you help, i appreciate it.

It worked but now is it the gun licence tab.

Sorry, i did not just add it to the ChangeJobVigui F4tabs.

Now it says something on line 246 is wrong but i have checked it nothing is wrong.

[Lua]
local F4Menu
local F4MenuTabs
local F4Tabs
local NoCloseF4 = CurTime()
local function ChangeJobVGUI()
if not F4Menu or not F4Menu:IsValid() then
F4Menu = vgui.Create(“DFrame”)
F4Menu:SetSize(770, 580)
F4Menu:Center()
F4Menu:SetVisible( true )
F4Menu:MakePopup( )
F4Menu:SetTitle(“Options menu”)
“Line 246” F4Tabs = {MoneyTab(), JobsTab(), EntitiesTab(), RPHUDTab(), TestTab()}
if LocalPlayer():IsAdmin() then
table.insert(F4Tabs, RPAdminTab())
end
if LocalPlayer():IsSuperAdmin() then
table.insert(F4Tabs, RPLicenseWeaponsTab())
end
F4Menu:SetSkin(“DarkRP”)
else
F4Menu:SetVisible(true)
F4Menu:SetSkin(“DarkRP”)
end
[/Lua]

Please help.

Try changing TestTab() to Testtab() like you originally had it, Lua is case sensitive.

Oh i found the error you see the Vgui.create In your code it was supposed to be a BIG C in create.
But now i can’t see Test on the F4Menu i can see Test Is written in the left upper corner but not in F4menu.

I have also changed the testtablabel to this.

[Lua]
function Testtab()

local testtabpanel = vgui.Create("DPanelList")
testtabpanel:SetSpacing(21)
testtabpanel:SetSize(750, 550)
testtabpanel:EnableHorizontal( true )
testtabpanel:EnableVerticalScrollbar( false )

end
[/Lua]

Oops sorry, try this:

[lua]
function Testtab()

local testtabpanel = vgui.Create(“DPanelList”)
testtabpanel:SetSpacing(21)
testtabpanel:SetSize(750, 550)
testtabpanel:EnableHorizontal( true )
testtabpanel:EnableVerticalScrollbar( false )

return testtabpanel

end
[/lua]

Oh thanks, it works now.
I will add the rest my self or i will try.

Can you use lua tags when posting please?

It will make it much easier to read.

Drake already asked me, i will do it next time.
Or if i knew how to do Lua tags.

[lua]

And at the other end the same but with a / before the lua

Thank you, thank you very much.