Flatbed setup
Use /flatbedsetup to place control, cargo, load, and winch offsets.
/flatbedsetup is an in-world editor for a Config.Vehicles row on the nearest truck. It prints a Lua block to F8 and copies it to the clipboard when lib.setClipboard exists. Paste that into Config.Vehicles.
Place the control point, select the bed bone (optional), vehicle attach offset, load zone, and select the winch bone (optional) and winch detect distance.
If your truck is not in the bundled list, use this command to add it, or contact me and I will be happy to configure it for you.
Place a ghost vehicle with a free camera, then copy the vehicle block.
Start
Stand next to a spawned truck (within 15m). The command uses the closest vehicle in that range, configured or not.
/flatbedsetup -- ghost uses sultan
/flatbedsetup comet2 -- ghost uses that spawn nameThe editor stays open until you finish or cancel. Your ped is hidden and frozen while it runs. Bed type starts from the existing Config.Vehicles entry, or rolling if the model is new.
Press G to cycle bed type: rolling → static → trailer. Phases that do not apply to the current type are skipped.
Phases
Order depends on bed type:
- Control. Place the interact point (where the world UI sits). Enter or left click confirms.
- Bed bone (rolling / trailer). Cycle bones with left / right arrows. Confirm the moving ramp bone.
- Cargo (rolling / static). Move and rotate the ghost to the on-bed snap pose.
- Load (rolling / static). Place the static load / unload zone (
dropOffseton static beds). - Winch bone (rolling / trailer). Cycle bones, then confirm the cable origin.
- Winch. Place the hook-check distance behind the truck (
hookBack). Confirm finishes.
R on control or bed-bone skips ahead as a static bed (control, then cargo). F finishes early and copies whatever you have placed.
Backspace undoes the last confirmed step. Escape cancels without copying.
Controls
Place mode (default):
| Input | Action |
|---|---|
| WASD | Move (relative to the truck) |
| Q / E | Down / up |
| Arrow keys | Rotate (cargo) or cycle bones (bed / winch bone) |
| Shift | Faster |
| Ctrl | Finer |
| G | Cycle bed type |
| Enter / left click | Confirm the current phase |
| R | Skip to static (control / bed bone only) |
| F | Finish and copy the vehicle block |
| Backspace | Undo the last step, or cancel |
| Escape | Cancel |
| X | Toggle free camera |
Free camera (X):
| Input | Action |
|---|---|
| WASD | Fly the camera |
| Q / E | Down / up |
| Shift | Faster |
| Mouse wheel | Zoom |
| X | Lock (back to place mode) |
| Escape | Cancel |
A TextUI readout shows the current phase, bed type, and the offset / bone name.
Output
Paste the clipboard block into Config.Vehicles:
[`flatbedm2`] = {
bed = 'rolling',
rampBone = 'misc_a',
unwindLimit = 10.0,
interact = vector3(-1.800, -4.500, -0.550),
cargoOffset = vector3(0.000, 1.200, -0.100),
cableBone = 'misc_b',
hookRadius = 5.000,
hookBack = 10.000,
rampRaised = 0.03,
rampLowered = 0.26,
},interact is the world UI. cargoOffset is the on-bed snap. dropOffset is the static load zone. rampBone / cableBone are entity bones. Rolling rows also get placeholder rampRaised / rampLowered values you can tune in-game.
Field matrix and extras (wheelDoor, roofAnim, attachLift): shared/config.lua. Player flow: Using flatbeds.
