• Print

Author Topic: [SOLVED]Coding help (derma)  (Read 4224 times)

0 Members and 1 Guest are viewing this topic.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
[SOLVED]Coding help (derma)
« on: December 18, 2014, 02:01:01 pm »

SOLVED![/shadow][/glow][/u][/b]


Hello! I had a quick question.... how would i make a text entry box under a derma command This is what i have so far....

Code: Lua
  1. local slay = vgui.Create( "DButton", MyDerma )
  2. slay:SetPos( 50, 225 )
  3. slay:SetText( "Slay" )
  4. slay.DoClick = function()
  5. MyDerma:Close()
  6. RunConsoleCommand( "ulx", "slay" )
  7. end

This code works fine but how do i make it do there is a text box under the button? After that how do i make it so if you type somthing in it puts in the console command.

ex: the code is RunConsoleCommand( "ulx", "slay" ) and i want the box to input a name. how would i do that?

Thanks!
« Last Edit: December 18, 2014, 02:15:43 pm by XxLMM13xX »

  • Print