Sign in to follow this  
LeozinH1

Check if the vehicle has fallen into the water

Recommended Posts

How can I find the vehicle fell into the water? The engineHealth does not work ... Thx!

Edited by LeozinH1

Share this post


Link to post
Share on other sites
mp.events.add('CheckWaterCrash', () => {

  let vehicle =  mp.players.local.vehicle;
  
  if (vehicle.isInWater() && !vehicle.getIsEngineRunning()) {

//do what you want

  }
});

 

  • Mask 1

Share this post


Link to post
Share on other sites
On 05/05/2018 at 2:28 PM, Captien said:
mp.events.add('CheckWaterCrash', () => {

  let vehicle =  mp.players.local.vehicle;
  
  if (vehicle.isInWater() && !vehicle.getIsEngineRunning()) {

//do what you want

  }
});

 

Thank you my friend, this will work until the engine life function works when the vehicle falls into the water.
Edited by LeozinH1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.