Narutimmy Posted October 6, 2013 Share Posted October 6, 2013 Hola como puedo detectar que un auto entro a un area? Link to comment
Sensacion Posted October 6, 2013 Share Posted October 6, 2013 Si es un colshape con onColShapeHit Link to comment
Narutimmy Posted October 6, 2013 Author Share Posted October 6, 2013 Si es un colshape cononColShapeHit lo ise asi: function hill_Enter ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) setVehicleDamageProof( theVehicle, true) end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Exit ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) setVehicleDamageProof( theVehicle, false) end addEventHandler ( "onColShapeLeave", hillArea, hill_Exit ) si funciona pero si el auto entra sin un piloto.... no funciona Link to comment
Sensacion Posted October 7, 2013 Share Posted October 7, 2013 Prueba con algo como: function hill_Enter ( hitElement ) if getElementType ( hitElement ) == "vehicle" then setVehicleDamageProof( hitElement, true) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) Link to comment
Recommended Posts