Common Issues
Checks for opening the dial, refusals, clicks, results, and the admin commands.
#Dial Does Not Open
Another resource must call PrepareSafeCrack on the server, then StartSafeCrack on the client within 30 seconds, once per preparation. The player must be within reach of the prepared coords, 3.0 metres by default, with no other dial open. Start zyke_lib, then zyke_safecrack, then the resource that uses it; see Integrating With Other Resources.
#Attempt Is Refused With an Unknown Tier
The console shows PrepareSafeCrack: unknown tier when a resource passes a tier missing from Config.Tiers. Add the tier to shared/config.lua and restart, or fix the case-sensitive name in that resource.
#Stethoscope Is Required
"You can't hear this lock without a stethoscope." means the tier has requireStethoscope = true, like the default vault, and the player lacks the Config.Items.stethoscope item. Copy it from extras/items into your inventory and add it to a shop, since nothing gives it by default. With Config.Items.stethoscope = false, such a tier can never start, so set requireStethoscope = false on it.
#Safe Is in Use or Relocked
"Someone is already working on this dial." means another player holds an attempt on that safe until they finish or leave, or it runs out after 30 seconds unopened or maxDuration once open. "The relocker fired, this safe won't open by its dial anymore." means all players' wrong pulls reached the tier's relockAfter. It stays locked for relockDuration seconds, 30 minutes by default, or with false until the owning resource calls ResetSafe.
#No Clicks Are Heard
Holding A or D passes Config.Dial.hearingSpeed within about half a second; hold Shift or scroll, and turn the way the blue arrow points. The click only sounds on the exact gate number, even with a wider window, and needs Config.Dial.sound = true.
#Handle Won't Budge With the Right Numbers
The first wheel is set turning right and each next one the other way, within the tier's window of its gate. On office and vault, some clicks are false; a stethoscope silences them. A red extra slot means a number was entered past the last wheel, and a full turn the same way clears the slots.
#Dial Closes by Itself
The attempt ends when the player loses health or armour, ragdolls, falls, dies, enters a vehicle, moves more than maxDrift, passes maxDuration, or pulls the handle out of reach. It also closes on CancelSafeCrack, or when the integrating resource or zyke_safecrack stops.
#Safe Opened but Nothing Happened
The integrating resource must read the result on the server with ConsumeSafeResult, which returns it once, within 30 seconds of the attempt ending. The console line too fast to be real, treated as cancelled means the open took under 0.9 seconds per wheel and was refused.
#Safe Has a New Combination
A safe gets a new combination when it is opened, when its relocker runs out, when ResetSafe is called, or when it is prepared with a different tier. Safe state is kept in server memory, so restarting zyke_safecrack also resets every safe.
#Safe Code Command Prints Nothing
/safecode prints to the server console or txAdmin's live console, not F8 or the chat. "There is no safe near you that someone has started on. Open its dial first." means no safe has a position within codeCommand.distance; open its dial and run the command from F8, as the chat is closed there. A relocked safe shows the relocker notification instead.
#Practice Command Is Missing or Denied
/safecracktest is only registered when the resource starts with Config.Settings.debug = true, so set it and restart zyke_safecrack. "You don't have permission to do this." means the player does not match Config.Settings.commandPermission, which both commands use.
#Camera Points at the Wrong Spot
Pass the dial prop as dial to StartSafeCrack; it must be a free prop, not attached to another entity. Without a prop, pass both coords and normal, pointing out of the dial's face, or the camera looks in front of the player.