• Quick Settings
    4 replies, posted
Quick settings! Change the maximum props and other things with ease! Instructions. Place in the garrysmod/garrysmod folder! Then, open up garrysmod to singleplayer and type in console, quick_settings! Picture - [img]http://i285.photobucket.com/albums/ll49/CoBullet/derma.png?t=1261442599[/img] Credits - Nishok :D - helped with bugs and stuffs Dingle - helped me find retarded bug Stebbzor - helped me find retarded bug(s) Co Bullet - Coder Download Link - [url=http://www.garrysmod.org/downloads/?a=view&id=86369][img]http://www.garrysmod.org/img/?t=dll&id=86369[/img][/url] Note: this is one of my first dermas so keep the flaming down if it sucks :P
For things like Ragdolls/Npcs/Vehicles i recommend setting the maximum value on the slider to something normal like 10, I don't think anyone would go higher than maybe 10-15 on any server for those things unless they're just generally being an idiot. Other than that for a first Derma it looks alright, Padding would be a good thing to look into though. :firstpost:
:ohdear: You certainly have a lot of sliders manually declared. In the future, one helpful tool for creating several derma items of the same type is a table (plus a for loop). For example, instead of creating twenty one different sliders, you can do: [lua] local sliders = { ["sbox_maxlamps"] = "Maximum Lamps Allowed", ["sbox_maxthrusters"] = "Maximum Thrusters Allowed", } for k,v in pairs(sliders) do local slider = vgui.Create( "DNumSlider") slider:SetSize(150,50) slider:SetText(v) slider:SetMin(0) slider:SetMax(1000) slider:SetDecimals(0) slider:SetConVar(k) List2:AddItem(slider) end [/lua] You could also do the same thing with the checkboxes. But all in all, good work on your first derma.
You should say too: that way you can add your own Server specific convars too without typing 5 additional lines.
[QUOTE=Entoros;19119552]:ohdear: You certainly have a lot of sliders manually declared. In the future, one helpful tool for creating several derma items of the same type is a table (plus a for loop). For example, instead of creating twenty one different sliders, you can do: [lua] local sliders = { ["sbox_maxlamps"] = "Maximum Lamps Allowed", ["sbox_maxthrusters"] = "Maximum Thrusters Allowed", } for k,v in pairs(sliders) do local slider = vgui.Create( "DNumSlider") slider:SetSize(150,50) slider:SetText(v) slider:SetMin(0) slider:SetMax(1000) slider:SetDecimals(0) slider:SetConVar(k) List2:AddItem(slider) end [/lua] You could also do the same thing with the checkboxes. But all in all, good work on your first derma.[/QUOTE] I wasn't even thinking about a loop with a table! Oh my god that could have been so helpful xD thanks.
Sorry, you need to Log In to post a reply to this thread.