Wibes Posted November 13, 2020 Posted November 13, 2020 At 0.3.7 there was no problems when i attach some object but now when i do it the object stay in same place but i move with empty hands. mp.events.add('AttachObject', (player,objectHash,bone,x,y,z,rx,ry,rz) => { if(attachObject != undefined) { attachObject.destroy(); } var object = mp.objects.new(objectHash, player.position, { rotation: new mp.Vector3(0, 0, 0), alpha: 255, dimension: player.dimension }); attachObject = object; let boneID = player.getBoneIndex(bone); object.attachTo(player.handle, boneID, x,y,z, rx, ry, rz, true, true, false, false, 0, true); });
Xabi Posted November 14, 2020 Posted November 14, 2020 Now you have to wait until the object is streamed to attach it.
Wibes Posted November 14, 2020 Author Posted November 14, 2020 (edited) 3 hours ago, Xabi said: Now you have to wait until the object is streamed to attach it. Well i put while entity... so it wait object to get streamed, now it attach but other players dont see the item? Edited November 14, 2020 by Wibes
Xabi Posted November 16, 2020 Posted November 16, 2020 On 11/14/2020 at 10:08 AM, Wibes said: Well i put while entity... so it wait object to get streamed, now it attach but other players dont see the item? Make sure you synchronize it as you're attaching them clientside, not serverside.
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