Jump to content

Help


^iiEcoo'x_)

Recommended Posts

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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...