yToPzz Posted July 5, 2022 Share Posted July 5, 2022 WARNING: bone_attach\bone_attach_c.lua:78: Bad argument @ 'setElementPosition' [Expected number, got NaN] WARNING: bone_attach\bone_attach_c.lua:79: Bad argument @ 'setElementRotation' [Expected number, got NaN] function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) ---- Line 78 setElementRotation(element,offrx,offry,offrz,"ZXY") ---- Line 79 Link to comment
Tekken Posted July 6, 2022 Share Posted July 6, 2022 (edited) Hi, I suspect you try using ‘0’ CJ skin? If so bonne_attach won’t work by default with it so you would need a workaround, yet I highly recommend you to change it with pAttach: https://forum.multitheftauto.com/topic/129019-rel-pattach-optimized-bone-attach/#comment-991624 it does the same yet faster and lighter, however offsets may need to be changed Edited July 7, 2022 by Tekken Typo 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now