⚙️API
Access tablet functionality from other scripts
Most export functions are called on client side, unless it has a note saying it's a server export.
Main
openTablet
---@param isSmall boolean
exports['sb-handlingtuning']:openTablet(isSmall)resetHandlingToDefault
---@param vehicle ?number
exports['sb-handlingtuning']:resetHandlingToDefault(vehicle)applyHandlingOnVehicle
---Apply handling data on vehicle entity (does not create new)
---@param vehicle number
---@param handlingData HandlingData
exports['sb-handlingtuning']:applyHandlingOnVehicle(vehicle, handlingData)assignHandlingToVehicle
---Assign new handling data to vehicle
---@param vehicle number
---@param handlingData HandlingData
exports['sb-handlingtuning']:assignHandlingToVehicle(vehicle, handlingData)applyHandlingValue
Additional handlings
With additional handlings you can feel free to express your imagination by modifying vehicle's handling values depending on various conditions or custom tuning parts.
setAdditionalHandling
Allows you to set a new additional handling
Arguments
vehicle:
number | nilVehicle which the additional handling will be assigned to defaults to vehicle player is sitting in.
slotName:
stringUsed to identify slot. If another additional handling would be installed on the same slot, the old one would get replaced
uniqueId:
stringUnique id for the handling
metadata:
table<string | 'enableHandlingFields', any>Data that will be assigned to the vehicle. Can have handling data
{fSteeringLock = 15.0}, enable handling fields {enableHandlingFields = {'fSteeringLock'}}or any other variable you'd want to assign to the vehicle to use for other scripts{myVariable = 7.5, myCoolVariable = false}
save:
booleanIf you want this handling to be saved in database set this to true
Example
Arguments
vehicle:
number | nilVehicle which the additional handling will be assigned to defaults to vehicle player is sitting in.
slotName:
stringUsed to identify slot from which the mod should be removed.
save:
booleanIf you want this change to be saved in database set this to true
enableAdditionalHandlings
disabledAdditionalHandlings
applyAdditionalHandlings
isAdditionalHandlingSlotEnabled
isAdditionalHandlingEnabled
Engine Swap
Engine swaps allows you to assign handling data from another vehicle that is saved in default handlings
setVehicleEngineSwap
Drift
setDriftMode
isDriftModeEnabled
getVehicleDifferentialMod
getDriftAngle
getDriftHeat
isDrifting
resetDataForDrift
Nitro
setNitro
toggleNitro
getNitroTankLevel
getNitroTankSize
setNitroTankLevel
saveNitroLevel
Stance
setFrontCamber
setRearCamber
setFrontWheelOffset
setRearWheelsOffset
Types
HandlingData
Last updated
Was this helpful?