This is the function I use (nicked from a kind Blitzer). 'rope' is just a cylinder.
;--------------------------------------
Function RopeEntToEnt(rope, ent1, ent2)
;--------------------------------------
Local distance#
Local x1#,y1#,z1#,x2#,y2#,z2#
Local Radius#=0.5
ShowEntity rope
x1# = EntityX(ent1,True)
y1# = EntityY(ent1,True)
z1# = EntityZ(ent1,True)
x2# = EntityX(ent2,True)
y2# = EntityY(ent2,True)
z2# = EntityZ(ent2,True)
distance# = EntityDistance#(ent1, ent2)
FitMesh rope, -Radius# / 2, -Radius# / 2, 0, Radius#, Radius#, distance#
PositionEntity rope,x1#,y1#,z1#
PointEntity rope,ent2
End Function
;--------------------------------------
Function RopeEntToEnt(rope, ent1, ent2)
;--------------------------------------
Local distance#
Local x1#,y1#,z1#,x2#,y2#,z2#
Local Radius#=0.5
ShowEntity rope
x1# = EntityX(ent1,True)
y1# = EntityY(ent1,True)
z1# = EntityZ(ent1,True)
x2# = EntityX(ent2,True)
y2# = EntityY(ent2,True)
z2# = EntityZ(ent2,True)
distance# = EntityDistance#(ent1, ent2)
FitMesh rope, -Radius# / 2, -Radius# / 2, 0, Radius#, Radius#, distance#
PositionEntity rope,x1#,y1#,z1#
PointEntity rope,ent2
End Function