I believe with TE_PLAYERATTACHMENT, as the name states, you can only attach the sprites to a player, and not any entity.
However, you can attach a sprite or model to any entity with the following code.
Code:
new iEnt = create_entity( "someclassname" );
// .. do your entity properties here
// here is where you want to set your offsets
new Float:fOrigin[3];
entity_get_vector( iSomeOtherEnt, EV_VEC_origin, fOrigin );
// .. Offsets (here we'll use only a z-offset, so the model/sprite appears above the entity)
fOrigin[2] += 20.0;
entity_set_origin( iEnt, fOrigin );
// now set the entity to follow an existing entity
entity_set_int( iEnt, EV_INT_movetype, MOVETYPE_FOLLOW );
entity_set_edict( iEnt, EV_ENT_aiment, iSomeOtherEnt );
Thing to note is that the really only
reliable way to follow an entity is by giving it a z-coordinate only, since any x/y coord will not rotate with the player when their angles change.
Hope this helps.
__________________