LeozinH1 Posted May 5, 2018 Share Posted May 5, 2018 (edited) How can I find the vehicle fell into the water? The engineHealth does not work ... Thx! Edited May 5, 2018 by LeozinH1 Link to comment Share on other sites More sharing options...
MrPancakers Posted May 5, 2018 Share Posted May 5, 2018 https://wiki.rage.mp/index.php?title=Entity::isInWater Use that to check if your vehicle is in the water. 1 Link to comment Share on other sites More sharing options...
LeozinH1 Posted May 5, 2018 Author Share Posted May 5, 2018 5 hours ago, MrPancakers said: https://wiki.rage.mp/index.php?title=Entity::isInWater Use that to check if your vehicle is in the water. Thanks for listening. This command returns true if the car is leaning against the water, I need the event when the vehicle is turned off because of the water. Link to comment Share on other sites More sharing options...
Captien Posted May 5, 2018 Share Posted May 5, 2018 mp.events.add('CheckWaterCrash', () => { let vehicle = mp.players.local.vehicle; if (vehicle.isInWater() && !vehicle.getIsEngineRunning()) { //do what you want } }); 1 Link to comment Share on other sites More sharing options...
LeozinH1 Posted May 6, 2018 Author Share Posted May 6, 2018 (edited) 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 May 6, 2018 by LeozinH1 Link to comment Share on other sites More sharing options...
KaneXane Posted April 22, 2022 Share Posted April 22, 2022 What must be done in order to repair a vehicle that has been submerged in water? I've tried doing basic repair and checking is vehicle is dead but still the player just exits the vehicle immediately. Link to comment Share on other sites More sharing options...
Kopra Posted April 23, 2022 Share Posted April 23, 2022 Try with respawn Link to comment Share on other sites More sharing options...
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