1. Post #1
    hellsgate700's Avatar
    May 2007
    87 Posts
    So, I'm trying to make a derma menu with these options such as a button that when pressed kills you, which works, but the problems I'm having are with the ConVars, such as sbox_maxprops or sbox_godmode. here is my code:
    Code:
    function dermaMenu()
    
    
    	local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself
    	DermaPanel:SetPos( 50,50 ) -- Position on the players screen
    	DermaPanel:SetSize( 200, 250 ) -- Size of the frame
    	DermaPanel:SetTitle( "Testing Derma Stuff" ) -- Title of the frame
    	DermaPanel:SetVisible( true )
    	DermaPanel:SetDraggable( true ) -- Draggable by mouse?
    	DermaPanel:ShowCloseButton( true ) -- Show the close button?
    	DermaPanel:MakePopup() -- Show the frame
    
    
    	local Slide = vgui.Create("DNumSlider", DermaPanel)
    	Slide:SetPos( 25,50)
    	Slide:SetSize(150, 100)
    	Slide:SetText("Max Props")
    	Slide:SetMin(0)
    	Slide:SetMax(250)
    	Slide:SetDecimals(0)
    	Slide:SetConVar("sbox_maxprops")
    	
    end
     
    								
    
    
    concommand.Add("DermaMenu", dermaMenu)
    It's made so that a menu pops up when you type Derma into the console. In the menu is a slider that (suppose to) affect the number of max props. I slide it to 0, but I'm still able to spawn props. That's where the problem is. Any advice helps.

  2. Post #2
    Cold Member
    Joshua Raphael's Avatar
    November 2011
    502 Posts
    It worked for me



    Is it the actual slider not working?

  3. Post #3
    hellsgate700's Avatar
    May 2007
    87 Posts
    It worked for me



    Is it the actual slider not working?
    Well, ya i got that exact thing thats on yur screen, but were u able to still spawn props when the slider went to zero? i was able to even tho it was at zero, meaning that the maxprops werent changed

  4. Post #4
    Cold Member
    Joshua Raphael's Avatar
    November 2011
    502 Posts
    Well, ya i got that exact thing thats on yur screen, but were u able to still spawn props when the slider went to zero? i was able to even tho it was at zero, meaning that the maxprops werent changed
    Yes



    Are you sure you are spawning props, and not ragdolls, or something?

  5. Post #5
    hellsgate700's Avatar
    May 2007
    87 Posts
    Yes



    Are you sure you are spawning props, and not ragdolls, or something?
    I don't know why it works with you (or probably everyone else) but I place the lua file in client and then run the file in console, drag it to 0, try to spawn something and it spawns. It is a prop, not a ragdoll though. Is there another thing I must do for it to work? Maybe another command or something?

  6. Post #6
    Cold Member
    Joshua Raphael's Avatar
    November 2011
    502 Posts
    I dunno - I copy & pasted your exact code into my lua/autorun/client/test.lua and it worked perfectly. If you want you can add me and I'll help you through it.

    http://steamcommunity.com/id/josh980
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Winner Winner x 1 (list)