Posticks

Posticks are used to attach objects to the player's limbs. They are different from osticks because they can only be attached to the player's limbs, they are always non-solid and can be scaled.

To add posticks, you can use /postick [model ID] [bone ID] (offset X) (offset Y) (offset Z) (rotation X) (rotation Y) (rotation Z) (scale X) (scale Y) (scale Z).

A simpler way would be to use /pospos to use SA-MP's GUI editor. Simply use /postick 2052 2 to add a hat to your head, then use /pospos to move/rotate/scale it.