Jump to content

Engine state when player enter/exit vehicle


Recommended Posts

Posted

Hey guys!

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

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

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

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.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...