Hello I have spent the last 2 days designing an addon for Gmod.But I came up with a lua problem.
The question is can I set a button so when I click it,it will define a variable,and If it isnt click it wont?
I tried this with this code
local seab = vgui.Create ( “DButton” );
seab:SetSize ( 50 , 20)
seab:SetPos (10 , 50)
seab:SetText( “Near Sea” )
seab:SetParent ( window )
seab.DoClick = function ()
answer1=“nearsea”
end
But it doesnt seem to work.
Thanks in advance.