Garry's Mod

Garry's Mod

31 ratings
PointShop 1 BodyGroup Selector
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
3.758 KB
6 Jul, 2019 @ 6:47pm
1 Change Note ( view )

Subscribe to download
PointShop 1 BodyGroup Selector

Description
This is an addon for the original PointShop that will allow you to customize the playermodels and or skins of the models on the pointshop (provided the models have them).

GitHub link[github.com] (will allow you to customize window colors and usergroups, you can also see better instructions)

Enabling selector

To know what to add, as a super admin type into console ps_bodygroupselector_preview and if your model has bodygroups or skins, you'll see sliders, it goes like this:

If the model has skins, a slider with the name Skin will appear, simple.
If the model has bodygroups, sliders will appear, their names will indicate what they are and the number between the [ ] will indicate their ids, for example [2] Hair indicating that the bodygroup with id 2 modifies the hair.

To enable the selector on a model you need to add skins and/or bodygroups to its item. You don't need to add both Skins and Bodygroups. (It looks kinda bad here, you can go to the GitHub link at the top)


ITEM.Skins = { 0, 1, 2 } -- You can skip numbers here, let's say, you don't like skin 1? Just remove it from the table.

ITEM.Bodygroups = {
['Name to display'] = { id = 1, values = { 0, 1, 2 } }, -- Remember the number between the [ ] ?
['Hair'] = { id = 2, values = { 1, 3 } }, -- This way you'll only be able to choose between hairstyle 1 and 3
}


Remember that not all playermodels have bodygroups and skins, if you see no sliders, it's because there are no bodygroups and there are no skins for that model.

One last step! You need to add self:SetBodygroups(ply, modifications) below ply:SetModel(self.Model).

After restarting the map, having the model equipped, click on it again and you'll see a Modify button.
16 Comments
PsychicalGamer 15 Jun @ 5:46am 
body groups doesnt work anymore :<
kapper 6 Mar, 2022 @ 5:35am 
@Fafy, yeah I see what you mean. Just seems odd that I can pick different "Skins" in the "Bodygroups" tab, when using Gmods normal Model Selector, but when printing it in console, it shows up with only Ties and Body. Huge thanks though for taking the time to try and help. Huge thumbs up for the addon.
Fafy  [author] 3 Mar, 2022 @ 11:28am 
@Kasper it looks like some models from that pack don't have the body bodygroup at all while some have them as ID 1 and others as ID 2. Try checking with lua_run PrintTable(Entity(1):GetBodyGroups()) in console (make sure you have the right model equipped)
kapper 3 Mar, 2022 @ 6:58am 
@Fafy I am trying to do it for "Suits and robbers addon" (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=412149725) . However, for most of them, you can only edit 1-2 of the bodygroups, usually being the "Tie" or "Skin", but the "Body" does't show up with an ID. Would really appreciate the help :lunar2019grinningpig:
Fafy  [author] 2 Mar, 2022 @ 3:08pm 
@Kasper All bodygroups should have an ID, if you can't find it let me know what the model is and I'll see if I can find it
kapper 2 Mar, 2022 @ 2:12pm 
What do you do when the ID is nothing for one of the categories? I have [1] and [2], but I can't get the one without any ID
⊰{TFA}⊱KZ Mantiss 17 Jan, 2021 @ 2:00pm 
Okay, I understand. Thank you, that helps a fair bit. :special:
Fafy  [author] 17 Jan, 2021 @ 10:31am 
You can enforce a skin by adding this after the SetModel line

ply:SetSkin(0)

where 0 is the skin you want to enforce
⊰{TFA}⊱KZ Mantiss 17 Jan, 2021 @ 2:08am 
Hi Fafy, I have a question, for particularly server-side setup. Is it possible for your addon to change the bodygroups of a playermodel, and the then post *that* version of the model on pointshop? i.e, {model} has 2 skins, and skin 1 is model default, but I want skin 2 to be in the pointshop, and not the other. Is your addon capable of this, or is there one existing to your knowledge?
Fafy  [author] 10 Apr, 2020 @ 6:51pm 
Hey Nevel, you can do bind key ps_bodygroupselector_preview where key is the button you want