AlexWo Posted May 23, 2013 Share Posted May 23, 2013 Hi I made a simple script called "Basejump" you enter a marker and you get warped to the tallest skyscraper in LosSantos. On the roof I placed a Parachute-Pickup via "createPickup" and so on. The Parachute appears but if I hit it, it disappears and I don't get the Parachute The script is Server-Based: Basejump1 = createMarker(1576.26, -1332.2, 15.6, "cylinder", 1.5, 255, 0, 0) Parachute1 = createPickup ( 1541, -1364.8, 329.8, 3, 371, 15000 ) function basejump1 (theMarker) if ( theMarker == Basejump1) then setElementPosition ( source, 1541, -1360, 329.8 ) end end addEventHandler ( "onPlayerMarkerHit", root, basejump1 ) function parachute1hit (thePickup) if ( thePickup == Parachute1 ) then giveWeapon( source, 371, 2) end end addEventHandler ( "onPickupHit", Parachute1, parachute1hit ) Link to comment
manve1 Posted May 23, 2013 Share Posted May 23, 2013 giveWeapon is wrong. parachute is 46 if im right. not 371 Link to comment
iPrestege Posted May 23, 2013 Share Posted May 23, 2013 function parachute1hit ( thePlayer ) if getElementType ( thePlayer ) == "player" then giveWeapon( thePlayer, 46, 2) end end addEventHandler ( "onPickupHit", Parachute1, parachute1hit ) Try it . Link to comment
AlexWo Posted May 23, 2013 Author Share Posted May 23, 2013 Yeah, ok it works now Thank you Link to comment
Castillo Posted May 24, 2013 Share Posted May 24, 2013 giveWeapon is wrong. parachute is 46 if im right. not 371 He must have confused the ID with the object ID, since 371 is the parachute object ID. 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