Documentation

Config

Explanations and examples for the current Safe Crack configuration.

Edit zyke_safecrack/shared/config.lua. Distances are metres and durations are seconds unless the setting says otherwise. Dial speeds are dial numbers per second; the dial has 100 numbers.

Framework, inventory, and notification settings live in zyke_lib. Texts are in locales/. Restart the resource after changing the config.

#Full Default Config

#Config.Settings

#debug

Registers /safecracktest [tier], which opens a practice dial in front of the player that opens nothing. The command is only registered when the resource starts, so restart it after changing this.

Example:

lua
debug = false

#commandPermission

Permission checked through zyke_lib by /safecracktest and the code command. Use one permission or a list; any match grants access. command is the ACE permission, and the remaining defaults are the ESX admin groups. Players without it receive "You don't have permission to do this."

Example:

lua
commandPermission = {"command", "admin", "superadmin", "owner"}

#codeCommand.name

Name of the command that prints a safe's combination to the server console. See Commands.

Example:

lua
name = "safecode"

#codeCommand.distance

When the admin has no attempt of their own, the code command uses the nearest safe within this many metres that somebody has started on.

Example:

lua
distance = 15.0

#maxDuration

Seconds an attempt may run once the dial is open. The dial closes at this limit and the attempt ends as cancelled.

Example:

lua
maxDuration = 300

#maxDrift

Metres the player may move from where the attempt started. Moving further closes the dial.

Example:

lua
maxDrift = 1.5

#relockDuration

Seconds a relocked safe stays locked. When it runs out, the safe gets a new combination and a working relocker. false keeps the safe locked until the resource that owns it calls the ResetSafe export.

Example:

lua
relockDuration = 1800

#Config.Camera

#fov

Field of view of the close-up in degrees. Lower values zoom in on the dial.

Example:

lua
fov = 30.0

#distance

Metres in front of the dial the camera sits.

Example:

lua
distance = 0.45

#blend

Milliseconds the camera eases in and out.

Example:

lua
blend = 600

#Config.Dial

#minSpeed, maxSpeed & rampTime

A turn starts at minSpeed when A or D is first pressed and reaches maxSpeed after the key has been held for rampTime seconds.

Example:

lua
minSpeed = 6.0
maxSpeed = 40.0
rampTime = 1.2

#fineSpeed

Speed while Shift is held.

Example:

lua
fineSpeed = 3.0

#hearingSpeed

Above this speed, no clicks are heard. With the default speeds, a turn key held for longer than about 0.4 seconds passes it. Turning with Shift or the scroll wheel always stays below it.

Example:

lua
hearingSpeed = 18.0

#sound

Plays the dial ticks and gate clicks. With false, the dial is silent and players rely on the shake alone, so keep tremor above 0.0 on your tiers.

Example:

lua
sound = true

#Config.Items

#stethoscope

Item name of the stethoscope. A player carrying it hears no false clicks, and tiers with requireStethoscope only start with it. false disables the item; tiers with requireStethoscope = true can then never be started, so set it to false on those tiers as well.

Example:

lua
stethoscope = "stethoscope"

#Config.Tiers

Each key is a tier name that integrating resources pass when they prepare an attempt. See Safe Tiers to add your own.

#wheels

Numbers in the combination, from 1 to 6.

Example:

lua
wheels = 3

#window

Numbers either side of a gate that still count when the handle is pulled. 0 means the exact number. The dial shakes while it sits within this window; the click itself only sounds on the exact gate number.

Example:

lua
window = 2

#decoys

False clicks per wheel that sound like a gate. A stethoscope silences them.

Example:

lua
decoys = 0

#tremor

How much the dial and the panel shake while the dial sits in the next wheel's gate window, from 0.0 to 1.0. 0.0 leaves the player with sound only.

Example:

lua
tremor = 1.0

#relockAfter

Wrong pulls on the same safe, counted over every attempt since its last reset, before its relocker fires. false never relocks.

Example:

lua
relockAfter = 6

#requireStethoscope

The attempt only starts while the player carries the stethoscope. Without it, the player is told "You can't hear this lock without a stethoscope."

Example:

lua
requireStethoscope = true