Jump to content

setVehicleEngineState


Snoozy

Recommended Posts

Posted

I'm trying to setVehicleEngineState(vehicle,false)

When I create a vehicle but for some reason that wont work, how come?

bool setVehicleFrozen ( vehicle theVehicle, bool freezeStatus ) 

works when I use that.

I'm running the setVehicleEngineState right after I createVehicle.

Posted

if you're using setVehicleEngineState(vehicle,false) it will turn the engine OFF

when you create a vehicle, it obviously gets created already in the state of "OFF" .. So changing something that is off to off makes no difference (or sense)

Try "true"

Posted

Yea well I've tried to set it to true, even tried to set it to true then back to false. It's just cause when the vehicle gets created the way the engine is off at that point is not really off, it's kinda on since you can drive it as soon as you enter it, if you go enter a vehicle after it's been spawned and sets the enginestate to false it will be like not able to drive at all

Posted

I don't think it works that way, it only disables the engine sound afaik and doesn't do anything physical. If you want to make it look like the engine doesn't work you can either freeze it or disable the vehicle controls on entering the vehicle.

Posted

Well I tried ingame and that was what it did to me which I find strange now ofcourse, I suppose I just disable the controls instead or so.

Posted

Once you enter the vehicle, its engine is always set to on. It does not matter of the engine state before you enter. Just switch it off when 'onVehicleEnter()' is triggered for example.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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