Skip to main content

Configuration

Explaining every config value of sf-trunks

Remember to configure the script before usage.

DevMode

DevMode enables command /trunk_create to be used by anyone on the server. This command gives user an ability to use trunk editor, to make any chosen vehicle take advantage of using trunks. By default it is set to false.

danger

Remember! Never use DevMode on production!

UseProgressBar

When UseProgressBar is set to true, trunks will use ProgressBar before four actions that player can perform:

  • Player getting into the trunk
  • Player getting out of the trunk
  • Player putting in other player into the trunk
  • Player gettting other player out of the trunk

Each of those actions have separate sections in the config:

  • GetIntoTrunkProgressBar
  • ExitTrunkProgressBar
  • PutPlayerIntoTrunkProgressBar
  • GetPlayerOutOfTrunkProgressBar

In those sections you can set duration in miliseconds of each progressbar. You can also set if progressbar is cancelable by changing canCancel to true.

OffsetEditorKeys

This section contains configuration for controls used in editor mode. Each action is set in the same way.

For example: { 191, "ENTER" }

191 - it's index of control
ENTER - it's text shown in helper UI while using editor

You can easily find indexes for controls in FiveM docs or by using https://mmleczek.com/tools/controls/

Camera

Here you can set up behavior of the camera while being in the trunk.

  • Stationary - by default it is set to false. This means that player is able to look around the vehicle. If you do not want such behavior, you can set it to true.
  • StationaryHeight - this parameter changes how high camera is relative to vehicle. By default it is set to 0.2 meters.
  • DistanceFromCar - here you can set how far camera is from the car. By default it is set to 3.0 meters.
  • FreeCameraSpeed - it is defining how sensitive non stationary camera is. By default it is set to 450.0.

EnabledKeysWhileInTrunk

This contans a list of controls that are enabled while player is inside trunk. By default, controls 249 and 245 are enabled (249 - it is for push to talk, 245 - it is for chat)