Garry's Mod

Garry's Mod

Christmas hat
Crizz P. 19 Dec, 2022 @ 4:38pm
To use with PointShop
To use this hat with pointshop (with dynamic scaling for models) I use the following:

ITEM.Name = 'Christmas Hat' ITEM.Price = 100 ITEM.Model = 'models/xmas/hat.mdl' ITEM.Attachment = 'eyes' function ITEM:OnEquip(ply) ply:PS_AddClientsideModel(self.ID) end function ITEM:OnHolster(ply) ply:PS_RemoveClientsideModel(self.ID) end function ITEM:ModifyClientsideModel(ply, model, pos, ang) local ply_s = ply:GetModelScale() model:SetModelScale(ply_s + (0.21 * ply_s), 0) pos = pos + (ang:Forward() * (-3.5 * ply_s)) + (ang:Up() * (2.6 * ply_s)) ang:RotateAroundAxis(ang:Right(), 20) ang:RotateAroundAxis(ang:Up(), -90) return model, pos, ang end
< >
Showing 1-2 of 2 comments
akronman1  [developer] 20 Dec, 2022 @ 3:47pm 
Wow, someone making code for my ported model. Thank you!:winter2019happyyul:
Crizz P. 21 Dec, 2022 @ 3:43am 
I sincerely hope doing this was okay... I figured more people would use it too, if they could use it in their stores. If I have offended you by doing it, I can remove the coding instructions. I meant no offense. Merry Christmas!
< >
Showing 1-2 of 2 comments
Per page: 1530 50