• How to open a menu with concommand.add
    3 replies, posted
Okay so i was wondering how to open my derma menu with a custom command that you type in console
Excuse me, typed from phone. [lua] concommand.Add("opencustommenu", function() -- Write the name of your function in here like this functionName() end) [/lua]
[QUOTE=Klaes4Zaugen;50853442]Excuse me, typed from phone. [lua] concommand.Add("opencustommenu", function() -- Write the name of your function in here like this functionName() end) [/lua][/QUOTE] You can simplify it. [lua] concommand.Add( "openmenu", functionName ) [/lua]
Or just create the function entirely directly [CODE] concommand.Add( 'openmenu', function( ply, cmd, args, argStr ) local menu = vgui.Create('DFrame') menu:SetSize( 500, 500 ) menu:Center() menu:MakePopup() end ) [/CODE]
Sorry, you need to Log In to post a reply to this thread.