redditing Posted July 17, 2020 Share Posted July 17, 2020 How to get the weapon position we are currently holding? Link to comment
Moderators Patrick Posted July 17, 2020 Moderators Share Posted July 17, 2020 Hi! You can't, but you can get player's right-hand position, with getPedBonePosition. Bone ID: 25 1 Link to comment
redditing Posted July 17, 2020 Author Share Posted July 17, 2020 4 hours ago, Patrick said: Hi! You can't, but you can get player's right-hand position, with getPedBonePosition. Bone ID: 25 There is one problem with that when aiming with a gun, then the Bone 25 doesn't work well, because the rifle is positioned differently and the bone 25 doesn't hold well. Link to comment
Moderators Patrick Posted July 17, 2020 Moderators Share Posted July 17, 2020 7 minutes ago, redditing said: There is one problem with that when aiming with a gun, then the Bone 25 doesn't work well, because the rifle is positioned differently and the bone 25 doesn't hold well. What are you doing exactly? Do you try to attach an object to player's hand? Because then, you need to use bone_attach (download). Link to comment
redditing Posted July 17, 2020 Author Share Posted July 17, 2020 (edited) 32 minutes ago, Patrick said: What are you doing exactly? Do you try to attach an object to player's hand? Because then, you need to use bone_attach (download). I am creating a new weapon, M16 I found an old model in GTA SA and wanted to use it, now I am in the phase of creating weapons in the weapon the point is that I have CreateWeapon and shoot as I wanted, but when the M4 created by CreateWeapon is aimed, it is set differently and additionally shoots otherwise, not where it aims, but somewhere above or below it depends on where you are looking By the way, I mention that M16 and CreateWeapon are attached to the bone 25 (12) Okay, never mind, I found the setWeaponTarget function by entering coordinates, but thanks for helping me :D Edited July 17, 2020 by redditing 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