carvalhosgamer Posted May 29, 2014 Share Posted May 29, 2014 Hello Guys, I'm studying MTA, and I have a problem with my code look this: thePed = createPed(12, 0,0,0 ) carIni = createVehicle ( 405, 133, 2218, 35.7,0,0, 180 ) warpPedIntoVehicle ( thePed, carIni ) setElementVelocity (carIni , 0, -0.1, 0) enyMarker = createMarker(141.8,1944,18, "cylinder" , 15.0, 0, 0, 0, 200) addEventHandler("onMarkerHit" , enyMarker, function() if getElementType(thePed) == "ped" and getPedOccupiedVehicle(thePed) then outputChatBox("sdsd") end end I need the condition of only ped touch the marker and do something only ped not the player Thanks! Link to comment
Mr_Moose Posted May 29, 2014 Share Posted May 29, 2014 You need to specify the parameters in your function: element hitElement, bool matchingDimension Change line 9 to this: function(thePed) and the hitElement will be passed to the event. Link to comment
carvalhosgamer Posted May 29, 2014 Author Share Posted May 29, 2014 You need to specify the parameters in your function: element hitElement, bool matchingDimension Change line 9 to this: function(thePed) and the hitElement will be passed to the event. Thank You! 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