Skip to content
Documentation
R_Atmrobbery

r_atmrobbery Exports & Commands

r_atmrobbery server exports, the hooks in the custom files and the admin command.

Server exports

ATMs are found by their position, so an ATM's id is its coordinates times ten, rounded: '1475_-21_573' for an ATM at 147.5, -2.1, 57.3. The admin command near shows the position of the nearest robbed ATM.

ResetAtm

Ends the cooldown and clears the cash of one ATM, or every ATM with 'all'. Returns true when it worked.

exports.r_atmrobbery:ResetAtm('all')

IsBeingRobbed

true while someone is robbing that ATM (not when it is only on cooldown).

if exports.r_atmrobbery:IsBeingRobbed(id) then
    -- robbery in progress
end

Hooks

server/sv_custom.lua and client/cl_custom.lua are open. Fill in these functions to tie the script to your server:

FunctionFileWhen
CanRob(src, atm, method)serverBefore a robbery starts. Return false to block it.
OnRobbed(src, atm, method, reward)serverAfter a successful robbery, with the cash and items paid.
OnAlarm(data, src)serverWhen the police get the call (used for lb-tablet).
CanRob(method, atm)clientBefore a robbery starts. Blocks dead, cuffed or in-vehicle players by default.
SkillCheck(difficulty)clientThe crowbar skill check.
HackMinigame(params, index, entity, token)clientThe hack. Swap in your own minigame.

method is 'crowbar', 'hack', 'thermite' or 'rope'.

Admin command

/atmrobbery <action> for R.Admin.group (admin and god by default).

ActionWhat it does
statusOne line per robbed ATM: position, phase, method and when it resets
nearThe nearest robbed ATM within 100 m and how far it is
resetReset the robbed ATM within 5 m of you
reset allReset every ATM