ai-robberies
Store, bank, jewelry and house robberies plus the armored truck job, all set in the admin panel and checked on the server.
ai-robberies lets players rob store registers and safes, bank lockers behind vault doors, jewelry vitrines and houses, and hit an armored truck. Each place has its own police requirement, cooldown and alert chance; each target has its tool, time, minigame and reward. The server checks every step.
What it does in the game
- Places and targets. A place is a store, bank, jewelry store or house. A target is one thing to rob there: a register, safe, locker, vitrine, door, house door or search spot. Each target is an interaction point (Rob, or Emptied while it waits for its cooldown).
- Robbing a target.
- The server checks the police on duty (the place's Police needed), the cooldown, the tool in the player's inventory, and that nobody else is working on the target.
- A minigame plays (lockpick or skill check, by kind or as set on the target). A lost game frees the target; a broken lockpick uses up one of the target's tool.
- A progress bar runs while the player faces the target and stays within 2.5 m.
- The server checks again, then pays the money into the panel's money account and gives the reward item.
- Kinds.
- Register, Safe, Locker: pay money and items.
- Vitrine: needs a weapon in hand.
- Door: opens a door until the place's cooldown ends instead of paying (an ai-doorlock door, or a vault object that swings open on every player's game).
- House door (break in): takes the robber inside the house's interior. Other targets of the house (search spots) work only for players inside it.
- Search spot: a place to search inside a house.
- Cooldown. A robbed target stays empty for its place's cooldown. An opened door stays open as long.
- Police alert. The first robbery of a visit may alert the police (the place's Alert chance), once per cooldown. The alert points to the place's alert point.
- Houses. Each occupied house is a private world (a routing bucket): only robbers of that house are inside. A player who leaves the server inside a house comes back at its door.
- Armored truck. At the job giver a robber pays the job price. A guarded truck parks at a random spawn. Guards attack players who come within 40 m. Plant the charge item on the rear doors, wait for the fuse, then loot the cash. An unrobbed truck goes away after its lifetime.
Installation
Installed by the AI Core recipe. By hand: ensure ai-robberies after ensure ai-core. It needs ai-core and OneSync.
- Items used by the defaults: tools
lockpick,drill,electronickit,c4; lootrolex,goldchain,diamond_ring. ai-inventory has them in its default item list; with another inventory, add them or change the targets. - Bank vault doors: targets with a Doorlock door id need ai-doorlock with that door. Without one, the vault object set on the target swings.
- Police alerts go to the police alert script AI Core uses.
The defaults copy QBCore's robbery scripts: 21 stores (registers and a safe each), 6 Fleeca banks, Paleto Bay and Pacific Standard (vault doors and lockers), Vangelico (20 vitrines), 81 houses with search spots, and the armored truck. That is about 870 targets.
Panel settings
Admin panel > Robberies. Defaults come from data/places.json, data/targets.json and data/settings.json.
Places tab
| Setting | What it changes | Unit | Default for a new place |
|---|---|---|---|
| Name | The place's name, shown on the alert and blip. 1-48 characters. | empty | |
| Alert point | Where the police alert points to. | 0, 0, 0 | |
| Police needed | On-duty officers needed before anything here can be robbed. 0-32. | 0 | |
| Cooldown | How long a robbed target stays empty (and an opened door open). 1-1440. | min | 30 |
| Alert chance | Chance that the first robbery of a visit alerts the police (once per cooldown). 0-100. | % | 100 |
| Show on the map | Shows the place with the Place blip look (Settings tab). | off | |
| Interior point (House card) | Set an interior to make this place a house: where robbers appear inside (and leave from). Leave at 0, 0, 0 for places that are not houses. | 0, 0, 0 |
Default values by place type:
| Places | Police needed | Cooldown | Alert chance |
|---|---|---|---|
Stores (store_1 to store_21) | 0 | 30 min | 70 % |
Banks (bank_1 to bank_6, paleto, pacific) | 2 | 60 min | 100 % |
Vangelico (vangelico) | 2 | 45 min | 100 % |
Houses (house_1 to house_81) | 0 | 60 min | 30 % |
Deleting a place stops its targets until they name another place.
Targets tab
Target
| Setting | What it changes | Unit | Default for a new target |
|---|---|---|---|
| Place | The id of the place this target belongs to (store_1). | empty | |
| Name | The target's name ("Register 1"). | empty | |
| Kind | Register, Safe, Locker, Vitrine, Door, House door (break in) or Search spot. Decides the animation. Vitrines need a weapon in hand; doors open instead of paying; a house door breaks in (the place needs an interior). | Register | |
| Spot | Where the robber works. The robber must stand within 2.5 m of it. | 0, 0, 0 | |
| Duration | How long the progress bar runs. 1-600. | s | 20 |
| Needed tool | Item the robber must carry. Empty: none. | empty | |
| The tool is used up | On: one of the tool is taken when the robbery succeeds. | off | |
| Minigame | Played before the progress bar. Automatic (by kind): lockpick for registers and house doors, skill check for safes, lockers and doors, none for vitrines and search spots. Or None, Skill check, Lockpick. A lockpick that breaks takes one of the needed tool. | Automatic | |
| Difficulty | Easy, Medium or Hard (not shown with None). | Medium |
Door (door targets open a door until the place's cooldown ends)
| Setting | What it changes | Unit | Default |
|---|---|---|---|
| Doorlock door | The id of a door in ai-doorlock. Empty: the vault object below swings instead. | empty | |
| Vault model | A map object within 6 m of the spot, turned on every player's game. | empty | |
| Closed heading | The object's heading when closed. -720 to 720. | ° | 0 |
| Open heading | The object's heading when open. -720 to 720. | ° | 0 |
Reward (money and items the robber gets when the time runs out)
| Setting | What it changes | Unit | Default |
|---|---|---|---|
| Money from / Money up to | A random amount between the two. 0-1,000,000. | $ | 0 / 0 |
| Item | Item given with the money. Empty: none. | empty | |
| Items from / Items up to | A random count between the two. 0-100. | 0 / 0 |
Default targets by kind:
| Targets | Tool | Duration | Money | Items |
|---|---|---|---|---|
| Store registers | lockpick | 20 s | $80-200 | |
| Store safes | none | 60 s | $400-1,200 | 0-3 rolex |
| Bank vault doors | electronickit (Paleto and Pacific also c4), used up | 30 s | ||
| Bank lockers | drill | 25 s | $500-1,500 | 1-4 goldchain |
| Vangelico vitrines | weapon in hand | 5 s | 1-4 rolex, goldchain or diamond_ring | |
| House doors | lockpick | 15 s | ||
| House search spots | none | 6 s | $0-120 | 0-1 rolex, goldchain or diamond_ring |
Settings tab
Settings (used by every place)
| Setting | What it changes | Default |
|---|---|---|
| Police jobs | On-duty members of these jobs count for Police needed. Up to 10. | police |
| Money account | Stolen money goes to this account of the robber. | cash |
| Place blip | How places with Show on the map on look on the map. | sprite 617, colour 3, size 0.7 |
Armored truck: a robber pays at the giver, a guarded truck parks at a random spawn; guards down, charge on the rear doors, cash.
| Setting | What it changes | Unit | Default |
|---|---|---|---|
| Job giver | Where robbers ask for the job. Leave at 0, 0, 0 to turn trucks off. | 960.78, -216.25, 76.25 | |
| Job price | Taken from the job price account. 0-1,000,000. | $ | 500 |
| Job price account | The account the job price is taken from. | bank | |
| Truck model | The truck. | stockade | |
| Guard model | The guards' ped model. | s_m_m_security_01 | |
| Guard weapon | Weapon name the guards carry. | WEAPON_CARBINERIFLE | |
| Truck lifetime | An unrobbed truck goes away after this time. 1-240. | min | 20 |
| Planting time | Progress bar for planting the charge. 1-120. | s | 5 |
| Fuse | Time between planting the charge and the doors blowing. 1-120. | s | 10 |
| Looting time | Progress bar for looting. 1-120. | s | 10 |
| Police needed | On-duty officers needed to start the job. 0-32. | 2 | |
| Time between trucks | Cooldown before the next truck job. 1-1440. | min | 45 |
| Charge item | Spent to blow the rear doors. | c4 | |
| Money from / Money up to | Cash in the truck. 0-1,000,000. | $ | 2,500 / 4,500 |
| Truck spawns | Up to 30 points (position and facing) where the truck parks. | 5 spawns |
Commands
None.
Keybinds
None. Targets and the job giver use ai-core's Interaction style (prompt with E, or a target option).
What it stands in for
No fxProvide. The defaults copy qb-storerobbery, qb-bankrobbery, qb-jewelery, qb-houserobbery and qb-truckrobbery, but it does not answer their exports or events.
Compatible scripts
Tools and loot go through AI Core's inventory layer, police alerts through the dispatch layer, the truck through AI Core's vehicle spawning. Any inventory and alert script AI Core supports works (see Compatibility).
Known limits
- Robbed targets and opened doors reset when the resource restarts.
- The minigame result comes from the player's game; the server still runs the progress bar and every check after it.
- Log channel:
robberies.