30.09.2010, 09:27
It's quite simple, all you need to do is to recreate the object in it's same positions and rotations.
For example:
For example:
pawn Код:
new object;
object = CreateObject(modelid,x,y,z,rotx,roty,rotz,drawdistance);
AttachObjectToPlayer(object,playerid,stuff here);
//And when you want to de-attach, simply:
new Float:x,Float:y,Float:z,Float:rotX,Float:rotY,Float:rotZ;
GetObjectPos(object,x,y,z);
GetObjectRot(object,rotX,rotY,rotZ);
DestroyObject(object);
object = CreateObject(modelid,x,y,z,rotX,rotY,rotZ,draw_distance);