Activity
Hacking Minigames
Five terminal-style hacking minigames, usable as a one-line export in any script or ready to use with a laptop item.
- Version
- 1.2.7
- Resource
- SF-Hacking
Overview#
Sequence
Memorise a run of cells, then reproduce it.
Circuits
Wire each terminal to its counterpart, with a tolerance for failed attempts.
Signal
Hold the signal inside the zone with the space bar.
Password
Crack a code, Mastermind style, with โ and โ clues.
Reflex
Hit the key the moment it lights up.
A library, not just a script
One exported line adds hacking to anything you already run. The call blocks and returns true or false.
Built-in targets
ATMs for a payout and a police alert, doors through SF-Doorlock, and vehicles.
Locked ambient vehicles
You cannot steal a car by climbing into it any more. Cars, trucks, bikes, boats and aircraft โ breaking a window achieves nothing.
Dependencies#
| Resource | Required | What for |
|---|---|---|
ox_lib | Required | Interface and shared helpers |
SF-Doorlock | Optional | Lets the password minigame force electronic locks |
Installation#
- Drop
SF-Hackinginto yourresourcesfolder. - Declare the
laptopitem โ seeITEMS.md, only needed for the built-in targets. - Add the line below to your
server.cfg, after ox_lib and your framework. - Set
Config.LockAmbientโ see the vehicle theft note below.
server.cfg
ensure ox_lib ensure SF-Hacking
Configuration#
| Setting | Default | What it does |
|---|---|---|
Config.AccentColor | phosphor green | The colour of the terminal |
Config.Difficulty | โ | Every parameter of the five minigames, per level |
Config.Targets | โ | Targets, their minigame, their reward, their police alert |
Config.LockAmbient.enabled | true | Lock ambient vehicles. false removes the feature entirely. |
Config.LockAmbient.radius | 70.0 | Sweep radius around the player |
Config.LockAmbient.skipMissionEntities | true | Spares script-placed vehicles โ garages and jobs keep working |
Config.LockAmbient.skipClasses | { 13 } | 13 is bicycles |
Config.Item / MaxDistance / Cooldown | โ | The item used, the range, and the delay between attempts |
Commands#
| Command | What it does |
|---|---|
/hack | Hack the nearest target |
/hacktest <type> <1-3> | Try a minigame at a given difficulty |
/sf_hack_debug | (console) Bridges, targets, sessions |
/sf_lock_debug | (Config.Debug) Vehicles seen, to protect, locked |
Exports#
client
local success = exports['SF-Hacking']:Start('sequence', 2)
if success then
print('hack succeeded')
end
exports['SF-Hacking']:StartRandom(3) -- a random minigame
exports['SF-Hacking']:GetTypes() -- the list of types
exports['SF-Hacking']:IsRunning() -- is a minigame running?Good to know#
An honest note on security: a minigame runs on the client by nature. For the built-in targets the server opens a single session โ item, distance and cooldown checked โ then re-validates that session before paying out, with a per-target cooldown, a payout cap and a police alert.
A player with an executor can still announce a win. That limit is common to every hack script that exists; the guards above keep what such an abuse is worth very low. For the library, the calling script decides what the result is allowed to do.
Vehicles placed by a script are spared through IsEntityAMissionEntity, so garages, dealerships and jobs are untouched. Setting Config.LockAmbient.enabled = false removes the feature completely.
After editing any file, run refresh then restart SF-Hacking. A restart on its own does not re-read the fxmanifest.