Lloyd Logan Posted April 1, 2013 Share Posted April 1, 2013 Hi, So I was wondering how to give something a name, (thats the best way I can describe it!), e.g. missesveh = createVehicle(blah) Then when that vehicle hits the marker (only that vehicle), the vehicle is destroyed e.g. if missesveh then destroyElement(missesveh) addEventHandler("onMarkerHit", completionmarker, etc) how would I do that? Thanks Lloyd Link to comment
Castillo Posted April 2, 2013 Share Posted April 2, 2013 You mean this? tempVehicle = createVehicle ( args... ) tempMarker = createMarker ( args... ) addEventHandler ( "onMarkerHit", tempMarker, function ( hitElement ) if ( hitElement == tempVehicle ) then destroyElement ( hitElement ) end end ) Link to comment
Lloyd Logan Posted April 2, 2013 Author Share Posted April 2, 2013 You mean this? tempVehicle = createVehicle ( args... ) tempMarker = createMarker ( args... ) addEventHandler ( "onMarkerHit", tempMarker, function ( hitElement ) if ( hitElement == tempVehicle ) then destroyElement ( hitElement ) end end ) That's exactly what i mean! Thank you. Link to comment
Lloyd Logan Posted April 2, 2013 Author Share Posted April 2, 2013 Can I ask one more question, Is it possible to tell when the towtruck has picked up a car? So like you have created a car, and you wan't to create the marker when the car has be lifted by the towtruck? -Lloyd Link to comment
Castillo Posted April 2, 2013 Share Posted April 2, 2013 Try this event: https://wiki.multitheftauto.com/wiki/OnTrailerAttach 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