Config
Explanations and examples for the current towing configuration.
Edit zyke_towing/shared/unlocked/config.lua. Examples below show current settings in the garages reference format. Distances are meters, speeds are km/h unless stated otherwise, and durations ending in Ms are milliseconds.
Keybinds can be changed in GTA / FiveM settings. Framework, inventory, target, and key-provider settings live in zyke_lib.
#Full Default Config
#Config.Settings
#debug
Enables development diagnostics. Leave disabled for normal gameplay.
Example:
luadebug = false
#commandPermission
Permission checked by tow action commands through
zyke_lib. This is a permission identifier, not a job name. It does not replace the server action hooks.Example:
luacommandPermission = "command"
#personalSettings.command
Command that opens personal settings.
Example:
luacommand = "towsettings"
#personalSettings.kvp
Client KVP key used to store preferences. Changing it selects a different saved preference entry.
Example:
luakvp = "towing_personal_settings"
#personalSettings.settings
Definitions for the winch-meter settings.
defaultapplies before a player saves a preference;force = trueapplies and locks that default without overwriting the saved preference. Slider definitions usemin,max, andstep; choice settings use avaluesarray. Keep the existing names used by the UI.Example:
luasettings = { {name = "winchMeterScale", values = "slider", default = 1.0, force = false, min = 0.5, max = 3.0, step = 0.05}, {name = "winchMeterHideDelay", values = "slider", default = 600, force = false, min = 100, max = 3000, step = 100, unit = "milliseconds"}, {name = "winchMeterAlwaysShow", values = {false, true}, default = false, force = false}, }
#towing.attachDistance
Maximum bumper-to-bumper attachment distance in meters for basic ropes. Cables use their winch maximum.
Example:
luaattachDistance = 9.0
#towing.selectDistance
Maximum player-to-vehicle distance in meters for automatic attach/detach selection.
Example:
luaselectDistance = 7.0
#towing.requireBothStopped
Requires both vehicles to be nearly stationary when attaching.
Example:
luarequireBothStopped = true
#towing.maxAttachSpeedKmh
Maximum attachment speed when
requireBothStoppedis enabled, in km/h.Example:
luamaxAttachSpeedKmh = 6.0
#towing.requireEmptyTowed
Requires the towed driver seat to be empty.
falseallows a driver in the load.Example:
luarequireEmptyTowed = false
#towing.requireUnlocked
Rejects locked towed vehicles when enabled.
Example:
luarequireUnlocked = false
#towing.requireItem
Consumes the material item after a successful player attachment. Manual detachment refunds item-funded connections; breakage does not.
Example:
luarequireItem = true
#towing.defaultRopeLength
Fixed basic-rope length in meters. Cables start at attachment distance instead.
Example:
luadefaultRopeLength = 7.0
#towing.attachTimeMs
Attachment progress duration in milliseconds;
0skips the bar.Example:
luaattachTimeMs = 3500
#towing.detachTimeMs
Detachment progress duration in milliseconds;
0skips the bar.Example:
luadetachTimeMs = 2000
#towing.carryEndDistance
Player reach in meters for bumper placement and detachment.
Example:
luacarryEndDistance = 1.0
#towing.carryDistance
Minimum carrying range in meters. The allowed range extends to the material attachment distance plus player reach.
Example:
luacarryDistance = 12.0
#towing.carryTimeoutMs
Maximum duration of a carrying session in milliseconds.
Example:
luacarryTimeoutMs = 300000
#towing.maxTowSpeedKmh
Towing speed cap in km/h.
0leaves normal vehicle speed uncapped by this setting.Example:
luamaxTowSpeedKmh = 0
#towing.pullPowerMultiplier
Pulling-torque assistance while the rope is taut.
1.0leaves pulling unassisted.Example:
luapullPowerMultiplier = 1.0
#towing.launchTractionLossMultiplier
Scales additional low-speed traction loss while towing.
0disables that loss;1retains normal handling.Example:
lualaunchTractionLossMultiplier = 0.0
#towing.blockedClasses
Vehicle classes excluded from towing. Default exclusions are bicycles, boats, helicopters, planes, and trains.
Example:
luablockedClasses = {[13] = true, [14] = true, [15] = true, [16] = true, [21] = true}
#towing.terrainIntegration.enabled
Reads Vehicle Terrain state when that resource is started.
Example:
luaenabled = true
#towing.terrainIntegration.stuckDepthThreshold
Terrain depth threshold used to identify a stuck tow load in attachment feedback.
Example:
luastuckDepthThreshold = 0.05
#towing.terrainIntegration.towerSoftPenalty
Scales the soft-ground reduction of the configured towing speed cap. Applies only when
maxTowSpeedKmhis positive.Example:
luatowerSoftPenalty = 0.5
#towing.terrainIntegration.maxPullReduction
Maximum fraction of pulling torque removed by the load terrain penalty.
Example:
luamaxPullReduction = 0.65
#towing.terrainIntegration.massInfluence
Relieves terrain penalties for lighter loads.
0disables mass-based relief;1uses the full mass ratio. Equal or heavier loads retain the original penalty.Example:
luamassInfluence = 0.5
#Rope Materials
Each entry under Config.Settings.towing.ropeMaterials owns its item, winch settings, carried prop, anchors, visuals, and break rules. Defaults use rope and metal. In the paths below, <material> means one of these keys.
| Setting | Basic Rope (rope) | Steel Cable (metal) |
|---|---|---|
| Item | tow_rope | tow_cable |
| Winch | Disabled | 3–30 meters, 1 meter/second |
| Break distance | 18 meters | Disabled |
| Break speed | 90 km/h | Disabled |
| Break when driven | Disabled | Disabled |
| Rope native type | 2 | 6 |
| Visual spawn distance | 75 meters | 75 meters |
#towing.ropeMaterials.<material>.ropeItem
Inventory item consumed for this material. Item definitions and usable-item registration must match.
Example:
luaropeItem = "tow_rope"
#towing.ropeMaterials.<material>.winch
Use
falsefor fixed-length rope or a table for adjustable cable. The table below is the steel-cable default.Example:
luawinch = {minLength = 3.0, maxLength = 30.0, speed = 1.0, catchupSpeed = 2.0}
#towing.ropeMaterials.<material>.winch.minLength
Minimum cable length in meters.
Example:
luaminLength = 3.0
#towing.ropeMaterials.<material>.winch.maxLength
Maximum cable length and cable attachment range in meters.
Example:
luamaxLength = 30.0
#towing.ropeMaterials.<material>.winch.speed
Cable reel-in / pay-out speed in meters per second while holding a winch key.
Example:
luaspeed = 1.0
#towing.ropeMaterials.<material>.winch.catchupSpeed
Recovery catch-up speed used to prevent tyre resistance from accumulating cable overstretch; keep recovery faster than the drum.
Example:
luacatchupSpeed = 2.0
#towing.ropeMaterials.<material>.breakDistance
Absolute bumper separation that breaks this material, in meters. Set to
falseto disable. Basic rope defaults to 18; steel cable disables it.Example:
luabreakDistance = 18.0
#towing.ropeMaterials.<material>.breakSpeedKmh
Pulling-vehicle speed threshold that breaks this material. Set to
falseto disable. Basic rope defaults to 90; steel cable disables it.Example:
luabreakSpeedKmh = 90.0
#towing.ropeMaterials.<material>.breakOnTowedDriven
Breaks the connection if the towed vehicle is driven when enabled. Disabled for both default materials.
Example:
luabreakOnTowedDriven = false
#towing.ropeMaterials.<material>.rope.ropeType
FiveM rope type used for the line visual. Basic rope uses 2; steel cable uses 6.
Example:
luaropeType = 2
#towing.ropeMaterials.<material>.rope.spawnDistance
Distance in meters within which the line visual is spawned.
Example:
luaspawnDistance = 75.0
#towing.ropeMaterials.<material>.carryProp.model
Prop shown while carrying the material. Basic rope uses
prop_stag_do_rope; cable usesprop_rope_family_3.Example:
luamodel = "prop_stag_do_rope"
#towing.ropeMaterials.<material>.carryProp.bone
Ped bone ID used to attach the carried prop.
Example:
luabone = 57005
#towing.ropeMaterials.<material>.carryProp.ropeBone
Ped bone name used for the carried rope endpoint.
Example:
luaropeBone = "IK_R_Hand"
#towing.ropeMaterials.<material>.carryProp.offset
Carried prop position relative to its ped bone. This is the basic-rope default; the full config includes cable alignment.
Example:
luaoffset = vector3(0.35552558302879, 0.0128183029592, 0.00060697877779)
#towing.ropeMaterials.<material>.carryProp.rotation
Carried prop rotation in degrees. This is the basic-rope default.
Example:
luarotation = vector3(143.31787109375, 150.04833984375, -43.87148666381836)
#towing.ropeMaterials.<material>.carryProp.rotationOrder
Rotation order passed to the prop attachment native.
Example:
luarotationOrder = 1
#towing.ropeMaterials.<material>.carryProp.useSoftPinning
Soft-pinning flag for the held prop attachment.
Example:
luauseSoftPinning = false
#towing.ropeMaterials.<material>.carryProp.collision
Collision flag used for the held prop.
Example:
luacollision = false
#towing.ropeMaterials.<material>.carryProp.syncRotation
Synchronizes the held prop rotation with its attachment.
Example:
luasyncRotation = true
#towing.ropeMaterials.<material>.carryProp.front.bones
Ordered vehicle bone candidates for the front anchor.
Example:
luabones = {"neon_f", "bumper_f"}
#towing.ropeMaterials.<material>.carryProp.front.offset
Centered front-anchor adjustment in vehicle-local meters.
Example:
luaoffset = vector3(0.0, 0.1, -0.05)
#towing.ropeMaterials.<material>.carryProp.rear.bones
Ordered vehicle bone candidates for the rear anchor.
Example:
luabones = {"neon_b", "bumper_r"}
#towing.ropeMaterials.<material>.carryProp.rear.offset
Centered rear-anchor adjustment in vehicle-local meters.
Example:
luaoffset = vector3(0.0, -0.1, -0.05)
#Vehicle Beds
#beds.access
Access mode:
"keys"requires carrier keys,"jobs"requires a listed job, and"none"allows anyone through this access check. In keys mode attached trailers use the towing vehicle keys; unattached trailers need no keys. Command permissions and hooks still apply.Example:
luaaccess = "keys"
#beds.jobs
Job names allowed in jobs mode. An empty array allows nobody.
Example:
luajobs = {"mechanic"}
#beds.selectDistance
Interaction range around the carrier loading point, not the vehicle center.
Example:
luaselectDistance = 10.0
#beds.loadingZoneSize
Global blue loading-box dimensions: width, length, and height in meters. The load vehicle origin must be inside it.
Example:
lualoadingZoneSize = vector3(6.0, 8.0, 4.0)
#beds.maxSpeedKmh
Maximum speed for stationary bed operations. The small nonzero default allows physics jitter.
Example:
luamaxSpeedKmh = 0.1
#beds.models
Supported model hashes and their carrier layout. Default models are
flatbed,tr2, andtrflat. The example defines a one-slot flatbed.Example:
luamodels = { [GetHashKey("flatbed")] = { maxVehicleSize = vector3(2.8, 5.0, 3.0), loadingZoneOffset = vector3(0.0, -9.0, 0.0), slots = { {offset = vector3(0.0, -2.4, 0.4), rotation = vector3(0.0, 0.0, 0.0)}, }, }, }
#beds.models.<model>.maxVehicleSize
Maximum load width, length, and height. Flatbed and trflat use 2.8 × 5.0 × 3.0; tr2 uses 2.6 × 4.8 × 3.0.
Example:
luamaxVehicleSize = vector3(2.8, 5.0, 3.0)
#beds.models.<model>.loadingZoneOffset
Loading-zone center relative to the carrier, also used as the offloading reference. Flatbed uses Y = -9; tr2 and trflat use Y = -11.
Example:
lualoadingZoneOffset = vector3(0.0, -9.0, 0.0)
#beds.models.<model>.requireTrunkOpen
When enabled, requires the guard/trunk to be open for loading or unloading. Enabled for tr2; omitted for the other default models.
Example:
luarequireTrunkOpen = true
#beds.models.<model>.trunkDoorServerIndex
Replicated door index for server trunk checks. Defaults to 5 when omitted; tr2 uses 1 because its client door 5 replicates as server door 1.
Example:
luatrunkDoorServerIndex = 1
#beds.models.<model>.slots
One entry per parking space, ordered by one-based slot index. Add separate floor heights for multi-deck layouts.
Example:
luaslots = { {offset = vector3(0.0, -2.4, 0.4), rotation = vector3(0.0, 0.0, 0.0)}, }
#beds.models.<model>.slots.<slot>.offset
Center of the deck floor in carrier-local meters. Vehicle bounds are centered horizontally and their rotated bottom rests on this plane.
Example:
luaoffset = vector3(0.0, -2.4, 0.4)
#beds.models.<model>.slots.<slot>.rotation
Loaded vehicle rotation relative to the carrier in degrees.
Example:
luarotation = vector3(0.0, 0.0, 0.0)
#beds.models.<model>.slots.<slot>.maxVehicleHeight
Optional slot-specific height limit overriding the model height. The three lower tr2 slots use 1.8 meters to leave upper-deck clearance.
Example:
luamaxVehicleHeight = 1.8