• Trying to make an hat mod.
    2 replies, posted
Hey facepunch I would like to make an hat mod now I wanted to know if theres any easy way to attach an entity to the player maybe theres a function that I dont aware of?
[b][url=http://wiki.garrysmod.com/?title=Entity.LookupBone]Entity.LookupBone [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and [b][url=http://wiki.garrysmod.com/?title=Entity.SetAttachment]Entity.SetAttachment [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
You could also give your hat model a bone named ValveBiped.Bip01_Head1 and then Set the parent of your hat model to the player using Entity.SetParent, then do Entity.AddEffects( EF_BONEMERGE ). This is pretty much how the engine does it with Weapons. However, note that if you do it this way it's usually permanent until the parent entity is gone. This method is probably better if you're making your own hat models.
Sorry, you need to Log In to post a reply to this thread.