Garry's Mod

Garry's Mod

NieR: Automata 2B ENHANCED (V2) [PM/NPC]
Fixy 19 Dec, 2017 @ 7:06am
Help with playermodel in pointshop
Ok Guys!

So im using this model on my Server and im using this with Pointshop. Im want my players to be able to decide about the bodygroups (Heaband, Beastlord, which skirt, ....) but the code i copied and adjusted from another model (Spartan [HALO]) doesnt seem to work properly. It just wont change anything. But the same code would work on the Spartan model... Of course i adjusted the code to work with the 2B model, however it didnt work.... Does someone know why? Or can submit me an working version of what im trying to do?

Here is my copied and adjusted code (fell free to use and edit but please help me XD)

https://pastebin.com/F08BHvfw

Its too long for Steam... So i posted it on Pastebin

https://pastebin.com/F08BHvfw
https://pastebin.com/F08BHvfw
https://pastebin.com/F08BHvfw
< >
Showing 1-2 of 2 comments
kuma7  [developer] 20 Dec, 2017 @ 7:50am 
In the function Entity:SetBodygroup( number bodygroup, number value ), bodygroup starts from 0, not 1, so it would be:
ply:SetBodygroup(0, modifications.group0 or 0) --Headband
ply:SetBodygroup(1, modifications.group1 or 0) --Skirt
ply:SetBodygroup(2, modifications.group2 or 0) --Virtuous Contract
ply:SetBodygroup(3, modifications.group3 or 0) --Beastlord

If you are not getting any error message that means the "modifications" array is empty; this also means that the error is not here, It is wherever you are calling these function, where you are not sending the values properly.
Last edited by kuma7; 20 Dec, 2017 @ 7:54am
Fixy 20 Dec, 2017 @ 9:17am 
It did change now for the first time but it wont change anything on the second, third, .... time...

And I dont get any errors. Not in my client console nor in my server console.



Edit:
It seems like if i equiped the Spartan pm (from which i got the code) and then equip the 2B pm it will be equiped with modified bodygroups. These are Bestlord ,no virtuous contract, default skirt and no headband.

The modified bodygroups will change when i modify the bodygroups of the Spartan pm and reequip the 2B pm.

It just won´t make sense to me...

This is the original code:

https://pastebin.com/9wxpHaT7
Last edited by Fixy; 20 Dec, 2017 @ 12:14pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50