Client

Exports - Clientside

toggleEngine

Toggles the Engine On/Off

Parameters bypass - boolean - Start/Stop the Engine without a Key needed - Optional

exports.msk_enginetoggle:toggleEngine()

-- Example with Bypass
exports.msk_enginetoggle:toggleEngine(true)

toggleLockpick

Starts the Hotwire Feature

exports.msk_enginetoggle:toggleLockpick()

GetEngineState

Parameters vehicle - entity - The Vehicle that you want the Enginestate from

Returns isEngineOn - boolean - whether the Engine is on or off

local isEngineOn = exports.msk_enginetoggle:GetEngineState(vehicle)

-- You can also use this:
local isEngineOn = Entity(vehicle).state.isEngineOn

SetVehicleDamaged

With this you can set the vehicle damaged so that you can't start the engine. If a player is driving this specific vehicle or the engine is on, the engine turns off automatically.

Parameters vehicle - entity - The Vehicle that you want to set the Damage State state - boolean - Set vehicle damaged state

exports.msk_enginetoggle:SetVehicleDamaged(vehicle, state)

-- Set vehicle damaged
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, true)
-- Set vehicle not damaged
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, false)

GetVehicleDamaged

With this you can get the current vehicle damaged state

Parameters vehicle - entity - The Vehicle that you want to get the Damage State from

Returns isVehicleDamaged - boolean - whether the vehicle is damaged or not

local isVehicleDamaged = exports.msk_enginetoggle:GetVehicleDamaged(vehicle)

-- You can also use this:
local isVehicleDamaged = Entity(vehicle).state.isDamaged

SetSteeringAngle

With this you can set the Steering Angle of the given vehicle.

Parameters vehicle - entity - The Vehicle that you want to set the Steering Angle angle - float - Set vehicle steering angle

exports.msk_enginetoggle:SetSteeringAngle(vehicle, angle)

-- Example:
exports.msk_enginetoggle:SetSteeringAngle(vehicle, 0.0)

GetSteeringAngle

With this you can get the current vehicles steering angle

Parameters vehicle - entity - The Vehicle that you want to get the Steering Angle from

Returns steeringAngle - float - Steering Angle

local steeringAngle = exports.msk_enginetoggle:GetSteeringAngle(vehicle)

-- You can also use this:
local steeringAngle = Entity(vehicle).state.SteeringAngle

Last updated