• Derma Sliders
    5 replies, posted
I need a slider to change the value of a variable. How do I do this?
Use the Garrysmod wiki... [url=http://wiki.garrysmod.com/?title=Lua]here[/url]
I did, it didn't give me any clues as to how it's done.
You can either use [url=http://wiki.garrysmod.com/?title=DNumSlider.ValueChanged]ValueChanged[/url] or you can get the slider to change a convar: [url=http://wiki.garrysmod.com/?title=DNumSlider.SetConVar]SetConVar[/url]
[lua] Slider1.ValueChanged = function(pSelf, fValue) bx1px = fValue end [/lua] Epic! Thanks!
No problem, the wiki is your friend.
Sorry, you need to Log In to post a reply to this thread.