• Dermas
    2 replies, posted
Anyone know a good place to learn how to make a basic derma? I go to the Garrysmod wiki and follow but it doesn't show how to make it so when you press a button it shows up..
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexe102.html[/url] Most of the lua tutorials still work there. just be sure to check the functions on the new gmod wiki. Also, for opening with a button, you're probably looking for something like [URL=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8f24.html]Gamemode.ShowSpare1[/URL].
I think I fixed the code a bit but I got an error when I start up a map. Heres my code below. Cl_init.lua [CODE]function DermaTest() local base = vgui.Create( "DFrame" ) local butt = vgui.Create( "DButton" ) base:SetPos( ScrW()/2 - 225, ScrH()/2 - 100 ) base:SetSize( 450, 200 ) base:SetVisible( true ) base:SetTitle( "Stab Chaze" ) base:SetDraggable( false ) base:ShowCloseButton( true ) base:MakePopup() butt:SetParent( base ) butt:SetText( "Kill" ) butt:Center() butt:SetSize( 150, 50 ) butt.DoClick = function() RunConsoleComman( "kill" ) end end usermessage.Hook( "Openpls", DermaTest )[/CODE] init.lua [CODE]function GM:ShowSpare2( ply ) umsg.Start( "Openpls", ply ) umsg.End() end[/CODE] The path for my lua files - C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\addons\Derma Test\lua\autorun\client When I press F4 it doesn't open the derma An error in my console when I join - [ERROR] addons/derma test/lua/autorun/client/init.lua:1: attempt to index global 'GM' (a nil value) 1. unknown - addons/derma test/lua/autorun/client/init.lua:1 I
Sorry, you need to Log In to post a reply to this thread.