DiEeR 1 Posted September 28, 2018 Greetings. I need to prevent player from automatically turning on vehicle engine on enter. I saw another thread with similar issue and tried suggested solution: Цитата 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. Seems like vehicle.setUndriveable does nothing. I tried setting it on events like playerStartEnterVehicle, playerEnterVehicle and even on playerSpawn for every vehicle but player still turns the engine on. Also I've found out that if player uses command /en (toggles engine state for occupied vehicle on server side) and leaves vehicle with engine off, next time he enters that vehicle he (the player) will play the animation of switching engine but the engine will stay turned off. Any ideas on how to solve this issue? Thanks. Share this post Link to post Share on other sites
DiEeR 1 Posted September 29, 2018 Guys on discord helped me to find out the solution. To solve the issue you need to add this code to clientside: mp.events.add({ 'playerEnterVehicle': (vehicle, seat) => { if (mp.players.local.getSeatIsTryingToEnter() !== -1 || vehicle.getIsEngineRunning()) { return; } vehicle.setEngineOn(false, true, true); } }); Hope this helps! 1 Share this post Link to post Share on other sites
hubba 108 Posted September 29, 2018 7 hours ago, DiEeR said: Guys on discord helped me to find out the solution. To solve the issue you need to add this code to clientside: mp.events.add({ 'playerEnterVehicle': (vehicle, seat) => { if (mp.players.local.getSeatIsTryingToEnter() !== -1 || vehicle.getIsEngineRunning()) { return; } vehicle.setEngineOn(false, true, true); } }); Hope this helps! awsome men,, enjoy) Share this post Link to post Share on other sites
John_Miller 1 Posted October 13, 2018 В 29.09.2018 в 18:30, DiEeR сказал: Guys on discord helped me to find out the solution. To solve the issue you need to add this code to clientside: mp.events.add({ 'playerEnterVehicle': (vehicle, seat) => { if (mp.players.local.getSeatIsTryingToEnter() !== -1 || vehicle.getIsEngineRunning()) { return; } vehicle.setEngineOn(false, true, true); } }); Hope this helps! how about getting out of the car so that the engine doesn't turn off? maybe there is a general command that turns off engine control Share this post Link to post Share on other sites
DiEeR 1 Posted October 13, 2018 1 час назад, John_Miller сказал: how about getting out of the car so that the engine doesn't turn off? maybe there is a general command that turns off engine control mp.events.add({ 'playerStartExitVehicle': (player) => { if (player.vehicle.engine) player.vehicle.engine = true; } }); Share this post Link to post Share on other sites