☰ All guides
ESX
6-ATM Robbery
ATM robbery with a drill mini-game, police alert with blip, cooldown and a configurable reward.
Resource folder
six_atmrobbery
01Requirements
- ESX (1.1, 1.2 or Legacy). QB-Core is not supported.
- The items
drillanduseddrill.
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_atmrobberyinto theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03Run
sql_esx.sqlin your database. It creates the itemsdrillanduseddrill. - 04Enter your police jobs in
Config.PoliceJobsand setConfig.RequiredCops. - 05Add
ensure six_atmrobberyto yourserver.cfg, belowes_extended. - 06Restart the server (or run
refreshand thenensurewith the folder name in the server console).
sql_esx.sql
INSERT INTO items (name, label) VALUES
('drill', 'Drill'),
('useddrill', 'Used Drill');
Good to know
ox_inventory: items are not read from the database. Add the item to ox_inventory/data/items.lua instead: ['drill'] = { label = 'Drill', weight = 100 },
03How a robbery runs
- 01The player stands in front of an ATM and uses the item
drill. - 02The script checks the cooldown and whether enough police are on duty.
- 03The drill mini-game starts. If the drill overheats, the robbery fails.
- 04The police jobs get a notification and a blip at the ATM.
- 05After
RobberyTimethe player receives a random amount betweenReward.minandReward.max. The drill turns into a used drill.
04Configuration
Option
- Config.newESX
truefor ESX Legacy (1.2 and newer),falsefor old ESX 1.1.- Config.Language
"en"or"de".- Config.RequiredCops
- How many police must be on duty.
0= no minimum. - Config.DrillItem / DrillUsedItem
- Item that starts the robbery and item the player gets back.
- Config.PoliceJobs
- Jobs that count as police and receive the alert.
- Config.Reward
- Smallest and largest reward.
- Config.RewardAccount
- Account the money goes to:
money,black_moneyorbank. - Config.RobberyTime
- Duration of a robbery in minutes.
- Config.Cooldown
- Minutes until the next robbery is possible. The cooldown applies to all ATMs together.
- Config.ATM_Props
- Prop names that count as ATM. Add the props of custom ATMs here.
- Client_Notify() / Server_Notify()
- Functions for notifications.
›config.luaComplete file · 58 lines
config.lua
Config = {}
Config.newESX = true
Config.Language = 'en'
Config.RequiredCops = 0
Config.DrillItem = 'drill' -- Item to start the robbery
Config.DrillUsedItem = 'useddrill'
Config.PoliceJobs = { 'police', "fib" } -- Jobs that can be called to the robbery
Config.Reward = { min = 15000, max = 30000} -- Min and Max reward for robbing an ATM
Config.RewardAccount = 'money' -- money, black_mone or bank
Config.RobberyTime = 3 -- Minutes
Config.Cooldown = 15 -- Cooldown in Minutes for all ATMs
Config.ATM_Props = {'prop_fleeca_atm', 'prop_atm_02', 'prop_atm_03'}
Config.Locales = {
['de'] = {
['robbery_failed'] = "Raub fehlgeschlagen! Viel Glück beim nächsten mal! [Überhitzung]",
['robbery_time'] = "Verbleibende Zeit:\n~r~%s Minuten %s Sekunden~w~",
['robbery_success'] = 'Raubüberfall ~o~erfolgreich~w~! Du hast ~g~%s$ ~w~erbeutet!',
['robbery_cooldown'] = 'Du musst noch %s Minuten warten!',
['robbery_missingCops'] = "Es sind nicht genügend Polizisten im Dienst! %s von %s im Dienst",
['robbery_call'] = 'Ein ATM wird gerade ausgeraubt! [Koordinaten: %s]',
['alert_notify_title'] = "~r~ATM-Raub",
['alert_notify_started'] = "Ein Überfall auf einen Geldautomaten wurde gemeldet!",
['alert_notify_ended'] = "Der Überfall wurde beendet!",
['alert_blip_name'] = "Überfall | ATM-Raub",
},
['en'] = {
['robbery_failed'] = "Robbery failed! Better luck next time! [Overheating]",
['robbery_time'] = "Remaining time:\n~r~%s minutes %s seconds~w~",
['robbery_success'] = 'Robbery ~o~successful~w~! You have ~g~%s$ ~w~looted!',
['robbery_cooldown'] = 'You have to wait %s minutes!',
['robbery_missingCops'] = "There are not enough police officers on duty! %s of %s on duty",
['robbery_call'] = 'An ATM is being robbed! [Coordinates: %s]',
['alert_notify_title'] = "~r~ATM-Robbery",
['alert_notify_started'] = "An ATM robbery has been reported!",
['alert_notify_ended'] = "The robbery has ended!",
['alert_blip_name'] = "Robbery | ATM-Robbery",
}
}
function Client_Notify(msg, type)
ESX.ShowNotification(msg) -- OR custom notification like TriggerEvent('six_notify', title, msg, type, time)
end
function Server_Notify(source, msg, type)
TriggerClientEvent("esx:showNotification", source, msg) -- OR custom notification like TriggerEvent('six_notify', source, title, msg, type, time)
end
05Troubleshooting
Nothing happens when using the drill.
The player is not close enough to an ATM, or the ATM is a prop that is not in Config.ATM_Props.
Dirty money does not arrive.
The account must be written black_money. The comment in older configs says black_mone.
06Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
