Garry's Mod

Garry's Mod

Christmas hat
Crizz P. 2022 年 12 月 19 日 下午 4:38
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
< >
正在显示第 1 - 2 条,共 2 条留言
akronman1  [开发者] 2022 年 12 月 20 日 下午 3:47 
Wow, someone making code for my ported model. Thank you!:winter2019happyyul:
Crizz P. 2022 年 12 月 21 日 上午 3:43 
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!
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50