Alexs Posted June 3, 2012 Share Posted June 3, 2012 Hola a Todos, tengo una duda sobre el Bone_attach, al crear el objeto que le atare, debe estar cerca o el lugar donde aparece no importa y llegara al otro elemento de todas formas?? No se si me explico, a ver un ejemplo: Esto: function tankHat ( source, commandName ) local x, y, z = getElementPosition ( source ) local tank = createVehicle ( 432, x, y, z + 5 ) attachElements ( tank, source, 0, 0, 5 ) end addCommandHandler ( "hat", tankHat ) Serviria igual que: function tankHat ( source, commandName ) local tank = createVehicle ( 432, 0, 0, 0 ) attachElements ( tank, source, 0, 0, 5 ) end addCommandHandler ( "hat", tankHat ) cierto? Link to comment
iFoReX Posted June 3, 2012 Share Posted June 3, 2012 alexs no necesariamente tiene que estar cerca yo cuando hacia un attachelements, ponia el objeto que se unira en (0,0,0) Link to comment
Alexs Posted June 3, 2012 Author Share Posted June 3, 2012 y con el "bone_attach" es lo mismo, No? Link to comment
iFoReX Posted June 3, 2012 Share Posted June 3, 2012 si supiera que es bone_attach... Link to comment
Alexs Posted June 3, 2012 Author Share Posted June 3, 2012 es un resource que une objetos a las distintas partes de un Player o Ped: attachElementToBone(element,ped,bone,x,y,z,rx,ry,rz) : attaches element to the bone of the ped. Server and client function.element : Element which you want to attach. ped : Ped or player which you want to attach element to. bone : Bone which you want to attach element to. x,y,z : Position offset from the bone. rx,ry,rz : Rotation offset from the bone. Returns true if element was successfully attached, false otherwise. detachElementFromBone(element) : detaches element from the bone of the ped. Server and client function. element : Element which you want to detach. Returns true if element was successfully detached, false otherwise. isElementAttachedToBone(element) : checks if element is attached to a bone. Server and client function. element : Element which you want to check. Returns true if element is attached to a bone, false otherwise. getElementBoneAttachmentDetails(element) : gets ped, bone and offset of attached element. Server and client function. element : Element which you want to get attachment details of. Returns ped,bone,x,y,z,rx,ry,rz used in attachElementToBone if element is attached, false otherwise. setElementBonePositionOffset(element,x,y,z) : changes position offset of attached element. Server and client function. element : Element which you want to change offset of. x,y,z : New position offset. Returns true if position set successfully, false otherwise. setElementBoneRotationOffset(element,rx,ry,rz) : changes rotation offset of attached element. Server and client function. element : Element which you want to change offset of. rx,ry,rz : New rotation offset. Returns true if rotation set successfully, false otherwise. getBonePositionAndRotation(ped,bone) : gets position and rotation of the ped bone. Client-only function. Returns bone x,y,z position and rotation if ped is streamed in and bone number is valid, false otherwise. Bone IDs: 1: head 2: neck 3: spine 4: pelvis 5: left clavicle 6: right clavicle 7: left shoulder 8: right shoulder 9: left elbow 10: right elbow 11: left hand 12: right hand 13: left hip 14: right hip 15: left knee 16: right knee 17: left ankle 18: right ankle 19: left foot 20: right foot y creo que seria lo mismo Link to comment
Recommended Posts