Hey.
As the title says i could use some help with menu environment, I just want to know how to create a basic derma menu there. Do anyone know how? Thanks :smile:
You need to include files to be run in the menu environment like this:
[lua]if MaxPlayers then return end
timer.Simple(0, function() for k, v in pairs( file.FindInLua( "menu/*.lua" ) ) do include( "menu/"..v ) end end)[/lua]
This should go in [i]lua/vgui/any_name_here.lua[/i].
Then in [i]lua/menu/[/i] you can put your Lua files to be run in the menu environment.
[editline]12:57PM[/editline]
Than you create your derma as normal.
Thanks you so much :smile:
[editline]02:10PM[/editline]
One question tho. How would i use [b][url=wiki.garrysmod.com/?title=G.CreateSound]G.CreateSound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] In the there? What should i use as the target when i cant use LocalPlayer()
I don't think you can use that at all. You should use [b][url=wiki.garrysmod.com/?title=Surface.PlaySound]Surface.PlaySound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] instead.
[QUOTE=NullPoint;19681995]I don't think you can use that at all. You should use [b][url=wiki.garrysmod.com/?title=Surface.PlaySound]Surface.PlaySound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] instead.[/QUOTE]
Well thanks, but i really needed that other function to work :S Anyway Thanks
Sorry, you need to Log In to post a reply to this thread.