• Making DModelPanel show skins and bodygroups.
    11 replies, posted
Hi, I use clockwork, the roleplaying framework. The character selection menu, seen here: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=292907717[/url] uses Dmodelpanel derma elements. The models I use have skins and bodygroups, problem is, when a skin or bodygroup is set on them, it doesn't show up on the character selection menu (Dmodelpanel). I've toyed around with a few methods suggested here and there, but nothing has worked. Can anyone point me in the right direction? Thanks!
DModelPanel.Entity:SetSkin( 1337 )
Question, what does the number in between the ()'s do?
It's the Skin Index you want the entity to use. [url]http://wiki.garrysmod.com/page/Entity/SetSkin[/url] Wiki is your friend. :)
I'm really confused here. What do you mean skin index? Like the actual, drop down menu for the skin? Do those count as indexes? I assume it'd be for the first one since theres only one skin dropdown menu and it's the first one. Sorry, I'm kinda stupid in these things. Any general idea of where I should put this code though?
[QUOTE=Sheeplie;45538140]I'm really confused here. What do you mean skin index? Like the actual, drop down menu for the skin? Do those count as indexes? I assume it'd be for the first one since theres only one skin dropdown menu and it's the first one. Sorry, I'm kinda stupid in these things. Any general idea of where I should put this code though?[/QUOTE] On the model you're using, they may have skins. normally like 1, 2, etc. If you're using derma..clientside file. lua/autorun/client? C'mon man! It's not hard.
but it's a server. So lua/autorun/server? What, just put it in there as a file on it's own? What would I even call it?? And how could this just go alone? It has to be attached to the actual Dmodelpanel or something, it wouldn't make sense. And models have DIFFERENT skins, I can't just make it so that all models set to skin 1! I'm sorry, I really do hate to sound like a whiny noob, but once someone actually takes the time to explain this to me, and it works, rather than giving me something and saying "figure it out" I'd actually be more competent in the future. Edit: [IMG]http://i.imgur.com/8sqUh8I.jpg[/IMG] lol
The fact that it's a server doesn't mean you put it in that directory. Try reading through [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb91f.html"]this[/URL] to see the differences between clientside and serverside. Its the outdated wiki but it might help you understand.
[QUOTE=Sheeplie;45538679]-snip Sheeplie's ignorance-[/QUOTE] You're running derma. Derma is clientside. Just because it's a server you don't run it serverside. Call it /anything/. Please. Look at the wiki. I am saying figure it out because it's the best way to do it. [url]wiki.garrysmod.com[/url]. Use it well, padawan.
lmao, that small lua lesson i gave you went to shit, you couldnt even figure out what local meant.
[QUOTE=Tolee;45540531]lmao, that small lua lesson i gave you went to shit, you couldnt even figure out what local meant.[/QUOTE] as far as I know, and correct me if I am wrong, local makes the variable only apply to that block of code and any strings branching off from it Also, I think I've got this down now. Hold the replies until I update for sure if it's been solved or not guys.
The hatin is strong with this one lol. In all seriousness though dude, I'd read through some tutorials, take a codeacademy class or something. Get a general idea of scripting before you try to do anything specific.
Sorry, you need to Log In to post a reply to this thread.