custom Posted May 28, 2018 Posted May 28, 2018 Hey guys! How to disable engine state changing after player enter/exit a vehicle. E.g. auto turning engine on when player enter vehicle
-Andreas Posted May 30, 2018 Posted May 30, 2018 (edited) Yes, the project is still alive. I suggest you start by looking at the two events 'PlayerEnterVehicle' & 'PlayerExitVehicle'. https://wiki.rage.mp/index.php?title=PlayerEnterVehicle https://wiki.rage.mp/index.php?title=PlayerExitVehicle They both provide you the vehicle in question. You can access its property named 'engine' and get/set it as you please. https://wiki.rage.mp/index.php?title=Vehicle::engine I hope that helps. Edited May 30, 2018 by -Andreas
custom Posted May 30, 2018 Author Posted May 30, 2018 5 часов назад, -Andreas сказал: Yes, the project is still alive. I suggest you start by looking at the two events 'PlayerEnterVehicle' & 'PlayerExitVehicle'. https://wiki.rage.mp/index.php?title=PlayerEnterVehicle https://wiki.rage.mp/index.php?title=PlayerExitVehicle They both provide you the vehicle in question. You can access its property named 'engine' and get/set it as you please. https://wiki.rage.mp/index.php?title=Vehicle::engine I hope that helps. Hey, thank you for help, but I guess, I didnt type"Automatically". So, I mean, when Player enter vehicle, vehicle's engine turns on without any forces. I don't need it. I want.. like player enter vehicle and engine stays off if it was off
Ryson Posted May 31, 2018 Posted May 31, 2018 (edited) I can confirm this on C# bridge. Bug can be reproduced by spawning a vehicle and turning off its engine . Then you connect to the server and go to the vehicle. When the person gets in, the engine turns on automatically. Edited May 31, 2018 by Ryson
ragempdev Posted May 31, 2018 Posted May 31, 2018 It's not a bug since it's expected GTA V behavior. However you can prevent player from starting the engine by using vehicle.setUndriveable clientside.
Recommended Posts