Jump to content

Help


Recommended Posts

I am trying to make a simple script that changes vehicle speed when the siren is turned on and when turned off to normal ..

however i couldnt figure how to change the handling when the siren is turned on inside the vehicle without reEntering it

here is the code below (server side):

function siren (thePlayer) 
vehicle = getPedOccupiedVehicle(thePlayer) 
sirenon = getVehicleSirensOn (vehicle) 
  
    if sirenon then 
    setVehicleHandling ( vehicle, "engineAcceleration", 17 ) 
    outputChatBox("on") 
    else 
    setVehicleHandling ( vehicle, "engineAcceleration", nil, false ) 
    outputChatBox ("off") 
    end 
  
end 
addEventHandler ( "onVehicleEnter",getRootElement(), siren ) 
  

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