Like these from NeithRP:
[IMG]https://i.gyazo.com/de3de4dfcc592f509e9c3138fc4d6dd8.png[/IMG]
[IMG]https://i.gyazo.com/f4a5353bf589bca1568c16a5c8c1740c.jpg[/IMG]
I use the same F4 Menu by the way, I need a Tab that mimics the Jobs tab and one that sends you to a webpage.
[editline]14th January 2016[/editline]
Bump?, Is it really this bad to ask?
I'm not even sure what you are asking here. I assume you want a tab for the browser. So you're going to have to take a look at[URL="http://wiki.garrysmod.com/page/Category:DHTML"]http://wiki.garrysmod.com/page/Category:DHTML[/URL] if you want to make a custom browser.
If you want to go the quick way and just make to where when they click the button it launches the steam browser and goes to a url, then take a look at [URL="http://wiki.garrysmod.com/page/gui/OpenURL"]http://wiki.garrysmod.com/page/gui/OpenURL[/URL]
Your question doesn't give much info -- so I feel like I'm just rambling on with no direction to really go in. Plus I also just woke up, so my brain isn't fully booted yet. Maybe it's just me.
in DarkRP modification there's a script with tabs, Basically I want the code to add a jobs tag and a guide on how to assign jobs to that tab (Donator Jobs) ( And custom jobs )
Yeah the F4 menu is what I assume you mean by (a script with tabs). So you're trying to create two additional tabs? A donator jobs tab, and a custom jobs tab?
Assuming you're asking how to create a new tab for new DarkRP, theres a wiki post on it:
[URL="http://wiki.darkrp.com/index.php/LUA:Modifying_F4#Add_a_tab_to_the_F4_menu"]http://wiki.darkrp.com/index.php/LUA:Modifying_F4#Add_a_tab_to_the_F4_menu[/URL]
[QUOTE=angrypygmy;49530240]Assuming you're asking how to create a new tab for new DarkRP, theres a wiki post on it:
[URL="http://wiki.darkrp.com/index.php/LUA:Modifying_F4#Add_a_tab_to_the_F4_menu"]http://wiki.darkrp.com/index.php/LUA:Modifying_F4#Add_a_tab_to_the_F4_menu[/URL][/QUOTE]
Glad you took this in a direction, a lot of the questions here are vague. lol.
But yeah, I'd follow the Wiki for darkrp, it has most of what you want. And then the other stuff can be found on the garry's mod wiki if you're looking to code custom functionality.
However, if you're looking to have someone CODE it for you, we don't do that. We guide you in the direction of where to look. If we just coded everything for everyone - nobody would learn. So I'd start with those two resources. If it's just new tabs, and the external link button, it's not a difficult thing to do.
I just don't understand where I need to put it.
Make a .lua file in autorun > client and call it whatever.lua Open it and paste the wiki code:
[lua]local function createMyTab()
local tab = vgui.Create("whatever...")
-- Create the your tab here or something
return tab
end
hook.Add("F4MenuTabs", "addTab", function()
-- Add the tab to F4 (will be added as the last tab)
-- DarkRP.addF4MenuTab("NAME OF TAB HERE", vguiControlOfTab) returns the tab number of the added tab
local tabNr = DarkRP.addF4MenuTab("My Custom Tab", createMyTab())
-- If you want it to move the tab to be before another, use this
-- DarkRP.switchTabOrder(TabNumberOfTabYouWantToMove, TabNumberOfDestination)
DarkRP.switchTabOrder(tabNr, 4)
end)[/lua]
From here, you can start doing your VGUI things / adding elements. Heres a couple links to get you started:
[URL="https://wiki.garrysmod.com/page/Derma_Basic_Guide"]https://wiki.garrysmod.com/page/Derma_Basic_Guide[/URL]
[URL="https://wiki.garrysmod.com/page/VGUI/Elements"]https://wiki.garrysmod.com/page/VGUI/Elements[/URL]
You can use an HTML element to have the tab open a web page:
[URL="https://wiki.garrysmod.com/page/Category:HTML"]https://wiki.garrysmod.com/page/Category:HTML[/URL]
As the author of the menu you're using this is an incredibly old version of the mod... I'd recommend updating.
I am not entirely sure that version supported the "F4MenuTabs" hook. The most recent version does.
Also sorry I'm a day late :L.
What f4 menu is that ur using
Sorry, you need to Log In to post a reply to this thread.