001 Posted October 1, 2016 Share Posted October 1, 2016 Any one give me Grenade launcher script ? Link to comment
iPrestege Posted October 1, 2016 Share Posted October 1, 2016 https://community.multitheftauto.com/index.php?p=resources&s=details&id=6465 And you can search in the community if you want another thing . Link to comment
001 Posted October 1, 2016 Author Share Posted October 1, 2016 (edited) i wanna grenade laucher replace with Fire extng. and u can throw grenades from it Edited October 1, 2016 by MasterMind200 Link to comment
aka Blue Posted October 1, 2016 Share Posted October 1, 2016 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
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