fr0stbyte Posted May 24, 2015 Share Posted May 24, 2015 I've been trying to figure out how to directly add a parachute to a pedestrian's inventory, or more specifically, to the player. The closest thing I could come up with is using native CREATE_PICKUP to spawn PICKUP_PARACHUTE at vector XYZ, where XYZ could be the Ped's coordinates. However, this might not always work as intended, as the parachute may not spawn directly on the ped when they are falling quickly from the sky. I've had a look at GIVE_WEAPON_TO_PED and I can't find a weapon hash for the parachute, so it might not be classed as one. Some help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 24, 2015 Share Posted May 24, 2015 How to give a ped a parachute: WEAPON::GIVE_WEAPON_TO_PED(ped, GAMEPLAY::GET_HASH_KEY("gadget_parachute"), 1, 0, 0); Link to comment Share on other sites More sharing options...
fr0stbyte Posted May 24, 2015 Author Share Posted May 24, 2015 (edited) Thanks, that's exactly what I needed. Just for future reference, here's the lua code I came up with. Short code using GTALua API player:DelayedGiveWeapon("gadget_parachute", 1) Extended code using Natives natives.WEAPON.GIVE_DELAYED_WEAPON_TO_PED( natives.PLAYER.GET_PLAYER_PED(natives.PLAYER.GET_PLAYER_INDEX()), -- int ped natives.GAMEPLAY.GET_HASH_KEY("gadget_parachute"), -- Hash weaponHash 1, -- int ammoCount false -- bool equipNow) Edited May 24, 2015 by fr0stbyte Link to comment Share on other sites More sharing options...
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