Majhol Posted January 29, 2013 Share Posted January 29, 2013 Hi All i just need a little help in making when a player hits the marker it create object i wish you can help me and thanks this is the code that i have reached to and can't complete it i wish i can get helped by u and thanks local marker = createMarker(2079.9399414063, 1007.7588500977,10.8203125, "cylinder", 10, 255, 255, 255, 0) function createTire(psource) createObject ( 2079.9399414063, 1007.7588500977,10.8203125, 90, 0, 0 ) setTimer(moveBack, 5000, 1) end end addEventHandler("onMarkerHit", marker, createTire) Link to comment
Baseplate Posted January 29, 2013 Share Posted January 29, 2013 marker = createMarker(2079.9399414063, 1007.7588500977,10.8203125, "cylinder", 10, 255, 255, 255, 0) function createTire(hitElement) createObject (id, 2079.9399414063, 1007.7588500977,10.8203125, 90, 0, 0 ) -- change id to the id you wanna add end addEventHandler("onMarkerHit", marker, createTire) Check the comment, you have to change id at createObject Link to comment
Majhol Posted January 29, 2013 Author Share Posted January 29, 2013 i need a second help please this is the code i made until now but i want when a player goes to a the first marker in the code they tell him you started the mission and go to tires marker and start it and its a solo mission for him so everyone gets a mission not a one do it and everybody cant because its being used or the tires already has been placed function starting(hitElement) markermis = createMarker( 1386.9837646484, -2198.814453125,13.539070129395, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", markermis, starting) marker = createMarker( 1604.2556152344, -2103.8518066406,18.375532150269, "cylinder", 1.5, 255, 255, 0, 170 ) marker2 = createMarker( 1602.9509277344, -2101.3615722656,18.388305664063, "cylinder", 1.5, 255, 255, 0, 170 ) marker3= createMarker( 1601.5798339844, -2099.2612304688,18.38455581665, "cylinder", 1.5, 255, 255, 0, 170 ) marker4 = createMarker( 1599.4366455078, -2096.0415039063,18.547512054443, "cylinder", 1.5, 255, 255, 0, 170 ) marker5 = createMarker( 1597.3601074219, -2092.8112792969,18.382898330688, "cylinder", 1.5, 255, 255, 0, 170 ) marker6 = createMarker( 1595.8270263672, -2090.4262695313,18.387573242188, "cylinder", 1.5, 255, 255, 0, 170 ) marker7 = createMarker( 1594.3381347656, -2088.1101074219,18.380485534668, "cylinder", 1.5, 255, 255, 0, 170 ) marker8 = createMarker( 1592.6345214844, -2085.4599609375,18.381044387817, "cylinder", 1.5, 255, 255, 0, 170 ) function createTire(hitElement) createObject (1327, 1605.4929199219, -2103.1025390625,18.465118408203, 180, 90, 9 ) end function createTire2(hitElement) createObject (1327, 1604.0155029297, -2100.4104003906,18.471321105957, 180, 90, 9 ) end function createTire3(hitElement) createObject (1327, 1602.9553222656, -2098.3054199219,18.490489959717, 180, 90, 9 ) end function createTire4(hitElement) createObject (1327, 1600.9392089844, -2095.1721191406,18.659139633179, 180, 90, 9 ) end function createTire5(hitElement) createObject (1327, 1598.955078125, -2092.0163574219,18.664535522461, 180, 90, 9 ) end function createTire6(hitElement) createObject (1327, 1597.4217529297, -2089.5693359375,18.506847381592, 180, 90, 9 ) end function createTire7(hitElement) createObject (1327, 1595.8522949219, -2087.0458984375,18.505527496338, 180, 90, 9 ) end function createTire8(hitElement) createObject (1327, 1594.3668212891, -2084.6303710938,18.509857177734, 180, 90, 9 ) end addEventHandler("onMarkerHit", marker, createTire) addEventHandler("onMarkerHit", marker2, createTire2) addEventHandler("onMarkerHit", marker3, createTire3) addEventHandler("onMarkerHit", marker4, createTire4) addEventHandler("onMarkerHit", marker5, createTire5) addEventHandler("onMarkerHit", marker6, createTire6) addEventHandler("onMarkerHit", marker7, createTire7) addEventHandler("onMarkerHit", marker8, createTire8) function emotion( player, matchingDimension ) setPedAnimation( player, "ped", "DAN_Down_A", -1, true, false, true ) setPedRotation ( player, 0 ) end addEventHandler("onMarkerHit", marker, emotion) addEventHandler("onMarkerHit", marker2, emotion) addEventHandler("onMarkerHit", marker3, emotion) addEventHandler("onMarkerHit", marker4, emotion) addEventHandler("onMarkerHit", marker5, emotion) addEventHandler("onMarkerHit", marker6, emotion) addEventHandler("onMarkerHit", marker7, emotion) addEventHandler("onMarkerHit", marker8, emotion) i wish you can help me and thanks Link to comment
Majhol Posted January 29, 2013 Author Share Posted January 29, 2013 what i mean i want every time we put the tires and enter the marker after 60second from entering it , it renew the markers and start the mission again 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