Runs on: server. This file stays editable when the resource is escrow-protected. Restart the resource after editing.
Server-only file: players never receive it, so it is the right place for passwords and hidden settings.
Full View
Preview File Updated: 3.7.0 - 02.11.2026config/hacking.lua
Config = Config or {}
-- ─────────────────────────────────────────────
-- Hacking (Command Prompt) — server only, players never receive this file
--
-- Hidden commands in the PC's Command Prompt. They are not listed by
-- `help`; players have to find out about them in roleplay.
-- netscan shows the City Hall network (no effect, a hint)
-- whois <plate> registered owner, model and insurance of a vehicle
-- sqldump <name> a citizen's licenses, documents and vehicles
-- inject <bill id> lowers one of your own unpaid bills, rarely deletes it
--
-- Every attempt needs `item` in the inventory. Without it the command just
-- answers "Access is denied." like a real system.
-- chance success chance 0.0 – 1.0
-- cooldown seconds before the same player can run the command again
-- traceChance chance that a SUCCESSFUL hack is still detected
--
-- A failed (or traced) hack writes a security incident to the Government
-- Portal (Activity log → Security incidents) and calls Alert below.
-- ─────────────────────────────────────────────
Config.Hacking = {
enabled = true,
item = 'hacking_usb',
commands = {
whois = { chance = 0.85, cooldown = 30, traceChance = 0.05 },
sqldump = { chance = 0.60, cooldown = 120, traceChance = 0.10 },
inject = { chance = 0.35, cooldown = 900, traceChance = 0.25,
minReduce = 10, maxReduce = 40, -- % taken off the bill
deleteChance = 0.05 }, -- chance the bill is cancelled instead
},
-- Jobs that get the built-in police alert (notification + blip)
policeJobs = { 'police', 'sheriff' },
alertBlipSeconds = 90,
-- Called when a hack is detected. coords = where the hacker sits.
-- Replace the body to use your dispatch script, e.g. ps-dispatch:
-- TriggerEvent('ps-dispatch:server:notify', { message = message, codeName = 'cyberattack',
-- code = '10-90', icon = 'fas fa-laptop-code', priority = 2, coords = coords,
-- jobs = { 'leo' } }) -- check your dispatch version's documentation
Alert = function(source, coords, message)
HackingPoliceAlert(coords, message) -- built-in: notify + blip for policeJobs
end,
}
