[QUOTE=AnonTakesOver;45551835][url]http://wiki.darkrp.com/index.php/Functions/darkrp/client/removef4menutab[/url][/QUOTE]
Could you please explain to me how to use that? I'm new to lua and such.
[QUOTE=Siiikes;45551875]Could you please explain to me how to use that? I'm new to lua and such.[/QUOTE]
Help me study for my math test tomorrow and we got a deal!
I kid, I kid, here:
[code]
DarkRP.removeF4MenuTab( "Weapons" )
[/code]
That should do it.
[QUOTE=AnonTakesOver;45551902]Help me study for my math test tomorrow and we got a deal!
I kid, I kid, here:
[code]
DarkRP.removeF4MenuTab( "Weapons" )
[/code]
That should do it.[/QUOTE]
I appreciate your help. Where do I put this?
[QUOTE=AnonTakesOver;45551835][url]http://wiki.darkrp.com/index.php/Functions/darkrp/client/removef4menutab[/url][/QUOTE]
I dont even use DarkRP :l.
[QUOTE=Siiikes;45551907]I appreciate your help. Where do I put this?[/QUOTE]
Anywhere
[QUOTE=G4MB!T;45551911]I dont even use DarkRP :l.[/QUOTE]
Creator don't like people editing core shit, though what you posted was good, I'll give you a star on the star chart for the effort.
[QUOTE=AnonTakesOver;45551918]Anywhere
Creator don't like people editing core shit, though what you posted was good, I'll give you a star on the star chart for the effort.[/QUOTE]
In what location/folder is what I meant to say.
[QUOTE=Siiikes;45551936]In what location/folder is what I meant to say.[/QUOTE]
Anywhere clientside.
[QUOTE=AnonTakesOver;45551991]Anywhere clientside.[/QUOTE]
So would gamemode/cl_init.lua work?
[QUOTE=Siiikes;45552005]So would gamemode/cl_init.lua work?[/QUOTE]
Aslong as it's called after the menu tab is loaded, it'll work.
[QUOTE=AnonTakesOver;45552054]Aslong as it's called after the menu tab is loaded, it'll work.[/QUOTE]
I put it at the bottom of cl_init.lua and it didn't work. Could you be more descriptive?
[QUOTE=Siiikes;45552303]I put it at the bottom of cl_init.lua and it didn't work. Could you be more descriptive?[/QUOTE]
holy fuk bro you're the definition of a Lua King. god dam.
STEP ONE: go into your addons folder
STEP TWO: create a directory WITH ANY NAME YOU WANT AS LONG AS IT'S NOT ALREADY IN USE
STEP THREE: open that directory
STEP FOUR: put a directory in that called 'lua'
STEP FIVE: open that directory
STEP SIX: put a directory in that called 'autorun'
STEP SEVEN: open that directory
STEP EIGHT: create a file in that directory called 'no_gunz.lua'
STEP NINE: open that file
STEP TEN: highlight the following code with your mouse by clicking and dragging over the text.
[CODE]
if SERVER then AddCSLuaFile() else
hook.Add( "Initialize", "christ_i_love_AnonTakesOver", function()
hook.Add( "F4MenuTabs", "hes_so_god_dam_sexy", function()
DarkRP.removeF4MenuTab( "Weapons" )
end )
end )
end
[/CODE]
STEP ELEVEN: right click on your now highlighted text, and select 'copy'
STEP TWELVE: right click on your now opened no_gunz.lua and select 'paste'
STEP THIRTEEN: navigate to the 'save' option in your text editor of choice.
STEP FOURTEEN: restart server. gently.
STEP FIFTEEN: appreciate AnonTakesOver for the time he spent helping you out with a simple-ass problem
[QUOTE=CallMePyro;45552364]holy fuk bro you're the definition of a Lua King. god dam.
STEP ONE: go into your addons folder
STEP TWO: create a directory WITH ANY NAME YOU WANT AS LONG AS IT'S NOT ALREADY IN USE
STEP THREE: open that directory
STEP FOUR: put a directory in that called 'lua'
STEP FIVE: open that directory
STEP SIX: put a directory in that called 'autorun'
STEP SEVEN: open that directory
STEP EIGHT: create a file in that directory called 'no_gunz.lua'
STEP NINE: open that file
STEP TEN: highlight the following code with your mouse by clicking and dragging over the text.
[CODE]
if CLIENT then
hook.Add( "Initialize", "christ_i_love_AnonTakesOver", function()
hook.Add( "F4MenuTabs", "hes_so_god_dam_sexy", function()
DarkRP.removeF4MenuTab( "Weapons" )
end )
end )
end
[/CODE]
STEP ELEVEN: right click on your now highlighted text, and select 'copy'
STEP TWELVE: right click on your now opened no_gunz.lua and select 'paste'
STEP THIRTEEN: navigate to the 'save' option in your text editor of choice.
STEP FOURTEEN: restart server. gently.
STEP FIFTEEN: appreciate AnonTakesOver for the time he spent helping you out with a simple-ass problem[/QUOTE]
Thank you. I appreciate both of your help and I can understand why you find my dumb question funny. As I said earlier, I'm not very experienced with lua and your answer helped me a lot. Thank you.
[QUOTE=Siiikes;45552407]Thank you. I appreciate both of your help and I can understand why you find my dumb question funny. As I said earlier, I'm not very experienced with lua and your answer helped me a lot. Thank you.[/QUOTE]
yeh for sho. also make sure to grab the updated code in my post or it wont actually send the file to clients when they connect.
[QUOTE=CallMePyro;45552414]yeh for sho. also make sure to grab the updated code in my post or it wont actually send the file to clients when they connect.[/QUOTE]
Thank you. This updated version is much better !
You could just do
[code]
if SERVER then AddCSLuaFile() else
hook.Add( "F4MenuTabs", "hes_not_so_efficient_tho", function()
DarkRP.removeF4MenuTab( "Weapons" )
end )
end[/code]
There's no need for Initialize hook there.
[QUOTE=Robotboy655;45552420]You could just do
[code]
if SERVER then AddCSLuaFile() else
hook.Add( "F4MenuTabs", "hes_not_so_efficient_tho", function()
DarkRP.removeF4MenuTab( "Weapons" )
end )
end[/code]
There's no need for Initialize hook there.[/QUOTE]
Oh true. I guess it's just habit that anything having to do with the gamemode goes into an Initialize hook.
edit:
[QUOTE]"hes_not_so_efficient_tho"[/QUOTE]
dayumm
-snip bad reading-
Sorry, you need to Log In to post a reply to this thread.