If you mean attaching object to another object yes, but bare in mind the object must be server-created, you cannot attach it to default GTA object, you would have to map or something like that. https://sampwiki.blast.hk/wiki/AttachObjectToObject
You could just create object, use editobject() and then move it where you want.
At the end just save the position