Documentation

Config

Explanations and examples for the current bollards configuration.

Edit zyke_bollards/shared/unlocked/config.lua. Distances are metres and durations ending in Ms are milliseconds unless stated otherwise.

Bollard groups, terminals, signals, and actions are created in the Admin Menu, not in this file. Framework, inventory, and permission settings live in zyke_lib.

#Full Default Config

#Config.Settings

#debug

Development flag. Leave it disabled on live servers. The in-game overlay is toggled with /bollarddebug instead.

Example:

lua
debug = false

#commandPermission

Permission checked on both client and server for the admin menu and the debug commands. This is a permission identifier, not a job name.

Example:

lua
commandPermission = "command"

#adminMenu.enabled

Enables the admin menu and its command.

Example:

lua
enabled = true

#adminMenu.command

Command that opens the admin menu.

Example:

lua
command = "bollards"

#adminMenu.refreshMs

Milliseconds between automatic refreshes of the group overview while the menu is open. Values below 1000 are raised to 1000.

Example:

lua
refreshMs = 3000

#streamDistance

Props are spawned on each client within this distance of a group.

Example:

lua
streamDistance = 150.0

#moveTime

Milliseconds a bollard takes to travel fully up or down.

Example:

lua
moveTime = {
    raise = 3200,
    lower = 2400,
}

#safetyStop

A rising bollard pops up a few centimetres first so traffic stops. It rises fully once no vehicle is over it or about to reach it.

Example:

lua
safetyStop = true

#maxBollardsPerGroup

Most bollards one group can hold.

Example:

lua
maxBollardsPerGroup = 64

#maxTerminalsPerGroup

Most terminals one group can hold.

Example:

lua
maxTerminalsPerGroup = 4

#maxSignalsPerGroup

Most standalone signals one group can hold.

Example:

lua
maxSignalsPerGroup = 6

#maxActionsPerGroup

Most driver, terminal, schedule, and script actions one group can hold.

Example:

lua
maxActionsPerGroup = 16

#defaults

Values a new group starts with in the admin menu. model is steel, band, slim, steel_tall, band_tall, or slim_tall. spacing is the gap between bollards, from 0.8 to 5.0. behavior is turn or wait for blocked NPC drivers. cycle is the seconds each phase of an alternating cycle stays green and the all-red gap between phases.

Example:

lua
defaults = {
    model = "steel",
    spacing = 1.6,
    behavior = "turn",
    cycle = {green = 20, clearance = 4},
}

#Map Markers

Markers show rows with raised bollards, so drivers see them coming. Each group can hide its marker in the admin menu.

#blips.enabled

Enables map markers for rows.

Example:

lua
enabled = true

#blips.sprite

Blip sprite. 163 is the no entry sign.

Example:

lua
sprite = 163

#blips.scale

Blip size.

Example:

lua
scale = 0.8

#blips.shortRange

Shows markers on the minimap only when close. The pause map always shows them.

Example:

lua
shortRange = true

#blips.showOpen

Also marks rows with every bollard down.

Example:

lua
showOpen = false

#blips.colours

Blip colours by row state. closed means no car fits through, partial that some bollards are raised, and open that all are down.

Example:

lua
colours = {closed = 1, partial = 47, open = 2}

#Config.Terminal

Access rules are set per terminal in the admin menu. See Terminals & Access.

#interactDistance

Reach of the terminal's interaction point.

Example:

lua
interactDistance = 2.0

#key

Default key for the interaction point. Players can rebind it in the FiveM keybind settings.

Example:

lua
key = "E"

#markerDistance

Distance the interaction point shows from. It fades in before the player is in reach.

Example:

lua
markerDistance = 5.0

#sessionSeconds

Seconds a granted terminal stays unlocked without being used.

Example:

lua
sessionSeconds = 120

#adminBypass

Lets players with commandPermission use every terminal without a code or matching rules.

Example:

lua
adminBypass = false

#pin

PIN length limits, the wrong codes allowed before the keypad locks, and the lockout in seconds.

Example:

lua
pin = {
    minLength = 4,
    maxLength = 8,
    maxAttempts = 3,
    lockoutSeconds = 60,
}

#itemSuggestions

Items offered in the admin menu when adding item access. Any item name can still be typed in.

Example:

lua
itemSuggestions = {"bollard_keycard"}

#accessCard

Item handed out at terminals set to issue access cards. A card only opens the terminal it was issued at.

Example:

lua
accessCard = "bollard_access_card"

#Config.Traffic

#laneGap

A gap between raised bollards at least this wide lets a car through. Narrower rows count as closed.

Example:

lua
laneGap = 2.6

#nodes

Closed rows switch off the road nodes around them, so traffic reroutes at junctions and does not spawn behind them. depth, widthPadding, and height size the switched-off area around the row.

Example:

lua
nodes = {
    enabled = true,
    depth = 40.0,
    widthPadding = 4.0,
    height = 4.0,
}

#guard

Stops AI cars already on the road at raised bollards and red signals. range is how far from the player rows are guarded, and stopDistance where cars stop before the row. In groups set to turn around, a car waits waitTime milliseconds and then heads for a road turnAroundDistance metres back.

Example:

lua
guard = {
    enabled = true,
    range = 200.0,
    stopDistance = 7.0,
    waitTime = 2500,
    turnAroundDistance = 45.0,
}

#Config.Sounds

Sounds play through zyke_sounds when it is started. Copy extras/sounds/bollards into zyke_sounds/nui/sounds/.

#enabled

Enables bollard sounds.

Example:

lua
enabled = true

#motor

Motor sound played at the moving bollards. name is the file inside zyke_sounds/nui/sounds, with its volume and audible distance.

Example:

lua
motor = {name = "bollards/bollard_motor.wav", volume = 0.05, distance = 15.0}