Sign in to follow this  
custom

Engine state when player enter/exit vehicle

Recommended Posts

Hey guys!

How to disable engine state changing after player enter/exit a vehicle. E.g. auto turning engine on when player enter vehicle

Share this post


Link to post
Share on other sites

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 by -Andreas

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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 by Ryson

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.