Jump to content

Any one give me Grenade launcher script ?


001

Recommended Posts

Ok, just use onClientPlayerWeaponFire and check if the weapon is the fire extng. If is, then create a projectile of granade :) 

function fireGranade( weapon, _, _, _, _, _, _ )
	if ( weapon == 42 ) then
		cancelEvent( ) -- Cancel the event
		local x, y, z = getElementPosition( source ) -- Get the player position
		createProjectile( source, 16, x, y, z ) -- Create grenade projectile
	end
end
addEventHandler( "onClientPlayerWeaponFire", root, fireGranade )

I think it should work, not tested yet

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