Jump to content

Shutdown Engines


monstergnom

Recommended Posts

Hello all,

I want to shutdown the engine of the car when I'm going out.

I used this script:

function turnEngineOff ( theVehicle, leftSeat, jackerPlayer )
-- if it's the driver who got out, and he was not jacked,
if leftSeat == 0 and not jackerPlayer then
-- turn off the engine
setVehicleEngineState ( theVehicle, false )
end
end
-- add 'turnEngineOff' as a handler for "onPlayerExitVehicle"
addEventHandler ( "onPlayerExitVehicle", getRootElement ( ), turnEngineOff )

But it didn't work for me.

I just searched the forum but didn't find anything...

Greets

Link to comment

We can't really help you unless we can see the script that's throwing off that error - but basically you're trying to use a variable that doesn't exist. Check spelling, capitalization (that CAPITAL letters are being used correctly), etc.

(Btw, are you Norwegian? :P)

Link to comment
We can't really help you unless we can see the script that's throwing off that error - but basically you're trying to use a variable that doesn't exist. Check spelling, capitalization (that CAPITAL letters are being used correctly), etc.

(Btw, are you Norwegian? :P)

Ok, sorry =)

Nah im not norwegian :D

Im talking about this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=190, i just downloaded it and inserted it into the resources folder, but it wont work :/ just this error i posted in the post above.

Link to comment
and how can i shutdown helicopters?

setHelicopterRotorSpeed (theVehicle, 0) doenst work, it gets this error:

attempt to call global 'setHelicopterRotorSpeed'

Read wiki PLEASE! This function is available client-side only.

Link to comment

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...