^iiEcoo'x_) Posted November 1, 2018 Share Posted November 1, 2018 test = createWeapon ( 'deagle' , Vector3 ( getElementPosition ( localPlayer ) ) )) addEventHandler ( 'onClientPlayerWeaponFire' , root , function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement , x , y , z ) setPedAimTarget ( source , hitX, hitY, hitZ ) fireWeapon ( test ) end ) I want to make the coordinates of the new weapon, The same shall be the lead coordinates of the original weapon, Link to comment
Dimos7 Posted November 1, 2018 Share Posted November 1, 2018 test = createWeapon ( 'deagle' , Vector3 ( getElementPosition ( localPlayer ) ) )) addEventHandler ( 'onClientWeaponFire' , root , function (hitElement, hitX, hitY, hitZ, x, y, z) setPedAimTarget ( localPlayer , hitX, hitY, hitZ, x, y, z, ) fireWeapon ( test ) end ) Link to comment
^iiEcoo'x_) Posted November 1, 2018 Author Share Posted November 1, 2018 not working, this code : test = createWeapon ( 'ak-47' , Vector3 ( getElementPosition ( localPlayer ) ) ) exports [ 'bone_attach' ]:attachElementToBone ( test , localPlayer , 12 , 0 , 0 , 0 , 0 , -90 ) addEventHandler ( 'onClientPlayerWeaponFire' , root , function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement , x , y , z ) setPedAimTarget ( localPlayer , hitX, hitY, hitZ , x , y , z ) fireWeapon ( test ) end ) Link to comment
Dimos7 Posted November 1, 2018 Share Posted November 1, 2018 Not working because the event you using is for reguler weapons not costum Link to comment
^iiEcoo'x_) Posted November 1, 2018 Author Share Posted November 1, 2018 7 minutes ago, Dimos7 said: Not working because the event you using is for reguler weapons not costum Yes I want to make a lead direction (costum weapon ) Similar to the direction of the original weapon Link to comment
Dimos7 Posted November 1, 2018 Share Posted November 1, 2018 1 hour ago, #_iMr,[E]coo said: Yes I want to make a lead direction (costum weapon ) Similar to the direction of the original weapon For that exist the event i give you 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