Garry's Mod

Garry's Mod

NieR: Automata 2B ENHANCED (V2) [PM/NPC]
Fixy 2017 年 12 月 19 日 上午 7:06
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
< >
正在显示第 1 - 2 条,共 2 条留言
kuma7  [开发者] 2017 年 12 月 20 日 上午 7:50 
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.
最后由 kuma7 编辑于; 2017 年 12 月 20 日 上午 7:54
Fixy 2017 年 12 月 20 日 上午 9:17 
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
最后由 Fixy 编辑于; 2017 年 12 月 20 日 下午 12:14
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50