• How do i code this?
    2 replies, posted
Ok so i am using The new point shop Golden Forge 1.1 and im confused on how to add hats. One of the codes it comes with is item.unique = "15" item.price = 250 if (CLIENT) then item.name = "Box" item.model = Model("models/props_junk/wood_crate001a.mdl") local scale = Vector(.4, .4, .4) item.LayoutEntity = function(player, entity) local position, angles = vector_zero, angle_zero local bone = player:LookupBone("ValveBiped.Bip01_Head1") entity:SetModelScale(scale) if (bone != -1) then position, angles = player:GetBonePosition(bone) position = position -(angles:Right() *1.5) +(angles:Forward() *-.19) -(angles:Up() *3)--2.51 -.19 -.21 -- angles:RotateAroundAxis(angles:Right(), 90) end return entity, position, angles end item.LayoutModel = function(panel, entity) if (entity:GetMaterial() != "models/weapons/v_stunbaton/w_shaft01a") then entity:SetMaterial("models/weapons/v_stunbaton/w_shaft01a") end end end now i changed the hat i added to -- Very important, this is used in the player equipped hats networked string. Shouldn't change this once set. -- And only use strings. item.unique = "100" item.price = 900 if (CLIENT) then item.name = "demo_domination" item.model = Model("models/Mouner/items/demo/demo_domination.mdl") local scale = Vector(0.8, 0.8, 0.8) item.LayoutEntity = function(player, entity) local position, angles = vector_zero, angle_zero local attachment = player:LookupAttachment("eyes") entity:SetModelScale(scale) if (attachment != -1) then attachment = player:GetAttachment(attachment) position, angles = attachment.Pos, attachment.Ang position = position -(angles:Right() *2) -(angles:Forward() *3) +(angles:Up() *0.5) end return entity, position, angles end end so can someone please tell me what im doing wrong, thanks
Use lua tags please.
Is item defined somewhere? Any errors?
Sorry, you need to Log In to post a reply to this thread.