Overview
- All 6 Fleeca branches on the map, no MLO to install.
- 5 approaches: intimidation, hacking, safecracking, explosives, thermal drill.
- In-game mini-games (
Hacking_PChacking, vault dial, drill), no progress bars. - Teller, panicking hostages, cameras to destroy, animated vault door.
- Random bonus: a deposit box to drill, a USB drive to deliver to a contact.
- ESX, QBCore, Qbox or no framework, detected automatically.
- Police dispatch can plug into your script, built-in alert otherwise.
- French and English included, English subtitles for the voice lines.
Presentation video, from the heist plan to delivering the USB drive: watch YF-Fleeca on YouTube.
Requirements
| Resource | Role |
|---|---|
ox_lib | Notifications, menus, client-server calls. |
ox_inventory | Plans, tools, USB drive, and cash in no-framework mode. |
ox_target | Plan vendor, cash table, hostages, contact. |
| Framework (optional) | es_extended, qb-core or qbx_core: cash and police job. Without a framework, see Police and dispatch. |
No database is needed: nothing is stored in SQL.
The cash pile and the pickup animation come from the Cayo Perico Heist DLC. Set sv_enforceGameBuild 2189 or higher in your server.cfg.
OneSync must be enabled: the server checks the players' position at every step.
Installation
Six steps, in this order.
Add the resource
Get YF-Fleeca from the Cfx.re portal (see Getting your purchases). Copy the
YF-Fleecafolder into your resources, without renaming it: the protected version is tied to that name. Add it to yourserver.cfg, after its dependencies and your framework.server.cfgensure ox_lib ensure ox_inventory ensure ox_target # ensure es_extended / qb-core / qbx_core ensure YF-FleecaDeclare the items
Add the block from the Items section at the end of
ox_inventory/data/items.lua, before the last closing brace.Copy the images
Copy the 11
yf_*.pngimages from theinstall/imagesfolder intoox_inventory/web/images.Grant the permissions
Staff commands use an ACE permission. In no-framework mode, so does the police.
server.cfgadd_ace group.admin yf-fleeca.admin allow # no framework only: add_ace group.police yf-fleeca.police allowAdjust the config
Open
shared/config.lua: language, police jobs, required number of officers, plan vendor, contact locations. Plug your dispatch intoserver/dispatch_custom.lua. Details in Configuration.Restart the server
A full restart is needed the first time, to load the new items. The console shows the detected framework:
[yf-fleeca] framework : esx.
Items
11 items: the five heist plans, the tools handed out at launch, and the bonus USB drive. The block below uses English labels; the French labels are in the French documentation.
-- YF-Fleeca
['yf_plan_teller'] = {
label = "Heist Plan [Intimidation]",
weight = 50,
stack = true,
close = true,
description = "Plan for a Fleeca robbery by intimidating the teller. Used up at launch.",
},
['yf_plan_laptop'] = {
label = "Heist Plan [Hacking]",
weight = 50,
stack = true,
close = true,
description = "Plan for a Fleeca robbery by hacking the vault. Exchanged at launch for the hacking laptop.",
},
['yf_plan_safecrack'] = {
label = "Heist Plan [Safecracking]",
weight = 50,
stack = true,
close = true,
description = "Plan for a Fleeca robbery by cracking the vault. Exchanged at launch for the safecracking kit.",
},
['yf_plan_bomb'] = {
label = "Heist Plan [Explosives]",
weight = 50,
stack = true,
close = true,
description = "Plan for a Fleeca robbery with explosives. Exchanged at launch for the charges.",
},
['yf_plan_thermaldrill'] = {
label = "Heist Plan [Thermal Drill]",
weight = 50,
stack = true,
close = true,
description = "Plan for a Fleeca robbery with a thermal drill. Exchanged at launch for the drill.",
},
['yf_fleeca_laptop'] = {
label = "Hacking Laptop",
weight = 2500,
stack = false,
close = true,
description = "Used to hack the vault door of a Fleeca.",
},
['yf_fleeca_crackkit'] = {
label = "Safecracking Kit",
weight = 1000,
stack = false,
close = true,
description = "Used to crack the vault door of a Fleeca.",
},
['yf_fleeca_charge'] = {
label = "Explosive Charge",
weight = 1000,
stack = true,
close = true,
description = "Placed on the vault door of a Fleeca.",
},
['yf_fleeca_drill'] = {
label = "Thermal Drill",
weight = 6000,
stack = false,
close = true,
description = "Mounted on the vault door of a Fleeca.",
},
['yf_fleeca_boxdrill'] = {
label = "Deposit Box Drill",
weight = 3000,
stack = false,
close = true,
description = "Drills the deposit boxes in the wall of a Fleeca vault.",
},
['yf_fleeca_usb'] = {
label = "Compromising USB Drive",
weight = 50,
stack = true,
close = true,
description = "USB drive taken from a Fleeca deposit box. A contact pays well to get it back.",
},| Item | Role | Weight |
|---|---|---|
Heist Plan [Intimidation]yf_plan_teller | Plan: intimidation | 50 g |
Heist Plan [Hacking]yf_plan_laptop | Plan: hacking | 50 g |
Heist Plan [Safecracking]yf_plan_safecrack | Plan: safecracking | 50 g |
Heist Plan [Explosives]yf_plan_bomb | Plan: explosives | 50 g |
Heist Plan [Thermal Drill]yf_plan_thermaldrill | Plan: thermal drill | 50 g |
Hacking Laptopyf_fleeca_laptop | Tool: hacking | 2,500 g |
Safecracking Kityf_fleeca_crackkit | Tool: safecracking | 1,000 g |
Explosive Chargeyf_fleeca_charge | Tool: explosives (×2) | 1,000 g |
Thermal Drillyf_fleeca_drill | Tool: thermal drill | 6,000 g |
Deposit Box Drillyf_fleeca_boxdrill | Bonus: drilling the box | 3,000 g |
Compromising USB Driveyf_fleeca_usb | Bonus: deliver to the contact | 50 g |
How a heist plays out
Default config values.
The alarm goes off 30 s after the launch. A robbed branch resets after 60 min; only one Fleeca heist at a time in the city.
The leader
Whoever launches the heist is its leader: they use up their plan, receive the tools, pick up the cash from the table and drill the bonus box. The whole crew sees the objectives. If the leader disconnects, another member takes over.
Failure
The heist fails if no crew member is able to act within 35 m of the entrance for 15 s, before the table is emptied. It is also closed automatically after 30 min. A discreet card at the top of the screen announces success or failure, without getting in the way of driving.
The approaches
The heist plan decides how the vault is opened. If the leader carries several plans, they choose at launch.
Intimidation
- No tool: you have to hold up the teller.
- Aiming and shooting raise the intimidation gauge.
- The more scared he is, the faster he opens the vault. Follow him while keeping him at gunpoint.
Hacking
- Laptop placed on the door's control box.
- The game's
Hacking_PCmini-game: open the right program, then the connection and the password. - A failed attempt sends you back to the desktop.
Safecracking
- Dial placed on the vault door.
- Turn right then left, notch by notch, listening for the click.
- E to give up.
Explosives
- Two charges to place on the door, left click.
- Take cover in the hall, then E to detonate.
- The beeps speed up for 6 s, then the door blows. The crew takes no damage.
Thermal drill
- The drill is mounted on the door and bores for 60 s.
- Meanwhile, keep the hostages at gunpoint: if the intimidation gauge drops, a hostage triggers the alarm.
- Remove the drill at the end (E) to open the vault.
Three customers are inside each branch. The crew can release them with ox_target: they walk out with their hands up then run away, something to negotiate with the police.
Bonus and contact
One time in four, a tip-off points to a sensitive deposit box in the vault wall. The leader receives a deposit box drill at launch.
- Drilling the box: hold left click for the motor, mouse up to push.
- The box contains a compromising USB drive, marked with the leader's name: only they can deliver it.
- A contact appears at a location drawn at random from the config. The crew gets the GPS route as soon as the box is drilled.
- The contact pays $5,000 per drive, in cash, with a short handover cutscene.
The contact only exists during a heist with a bonus, or as long as a drive has not been delivered. They stay at the same spot until then, and the next draw avoids that location.
Configuration
shared/config.lua is the only settings file to edit, commented in French and English. An invalid value is reported in the console at startup and replaced by its default.
| Setting | Default | Effect |
|---|---|---|
Config.locale | 'fr' | Language of the texts shown: 'fr' or 'en'. See Languages. |
Config.framework | 'auto' | 'auto' detects qbx_core, then qb-core, then es_extended, otherwise runs without a framework. To force one: 'esx', 'qb', 'qbx', 'standalone'. |
Config.money.item | 'money' | No framework only: the ox_inventory item used as cash. With a framework, the framework's cash is used. |
Config.admin.ace | 'yf-fleeca.admin' | ACE permission that grants access to the staff commands. |
Config.police.jobs | { 'police', 'sheriff' } | Technical names of the jobs counted as police, with ESX, QBCore or Qbox. They receive the built-in alert and count towards the minimum number of officers. |
Config.police.ace | 'yf-fleeca.police' | No framework only: a player with this ACE permission counts as an on-duty officer. |
Config.police.minOnDuty | 4 | On-duty officers required to launch a heist. Set 0 to test alone. |
Config.loot | 8000 – 12000 | min and max of the cash on the table. The amount is drawn by the server and never sent to the client before the pickup. |
Config.planVendor | The NPC selling the plans, at a single position: coords as vec4(x, y, z, heading), and price, the price of a plan in cash ($3,200). His seat follows his position automatically. No blip: the address is passed on between players. | |
Config.bonus.chance | 25 | Percentage of heists with the bonus box, from 0 (never) to 100 (always). |
Config.contact | locations: possible locations of the contact who buys the USB drive, as vec4(x, y, z, heading); 12 provided, add or remove as you like. reward: payment per delivered drive, drawn between min and max ($5,000). |
Stand at the spot you want, facing the desired direction, then read your coordinates and heading with your admin menu (or GetEntityCoords(PlayerPedId()) and GetEntityHeading(PlayerPedId())). The expected z height is that of a standing player.
Shipped file
The complete file with its default values. Copy it back to return to the original configuration.
Config = {}
Config.locale = 'fr'
Config.framework = 'auto'
Config.money = { item = 'money' }
Config.admin = { ace = 'yf-fleeca.admin' }
Config.police = {
jobs = { 'police', 'sheriff' },
ace = 'yf-fleeca.police',
minOnDuty = 4,
}
Config.planVendor = {
coords = vec4(-358.2050, 16.1889, 46.3549, 258.7397),
price = 3200,
}
Config.loot = {
min = 8000,
max = 12000,
}
Config.bonus = {
chance = 25,
}
Config.contact = {
locations = {
vec4(1085.0905, -2287.8787, 30.2286, 262.7219),
vec4(143.0727, -3075.3372, 5.8963, 180.3207),
vec4(-564.8896, -2322.7942, 13.9146, 318.2265),
vec4(176.4104, -686.3036, 33.1230, 158.1722),
vec4(-372.4448, -92.6789, 45.6637, 254.9622),
vec4(-1024.3159, 828.6182, 172.3921, 4.4594),
vec4(2340.9258, 3140.4905, 48.2087, 261.8160),
vec4(1536.9336, 3589.5247, 38.7665, 123.9719),
vec4(-510.1786, 4366.8784, 67.6254, 170.0338),
vec4(1979.6206, 5176.8965, 47.6391, 219.5273),
vec4(1711.2861, 6432.3477, 32.7621, 332.8784),
vec4(2.6436, 6279.2295, 31.3743, 217.8062),
},
reward = { min = 5000, max = 5000 },
}Police and dispatch
Who counts as police depends on the framework:
| Framework | On-duty officer |
|---|---|
| ESX | Job listed in Config.police.jobs, and on duty if your ESX handles duty. |
| QBCore · Qbox | Job listed in Config.police.jobs with onduty. |
| No framework | Player with the ACE permission yf-fleeca.police. |
Plugging in your dispatch
server/dispatch_custom.lua is not encrypted. The CustomDispatch(alert) function is called at every alarm: send the alert with your script and return true. If it returns false, or if your code crashes, the built-in alert takes over: a notification and a flashing blip for on-duty officers.
The function runs server-side, 30 s after the heist is launched. Use your dispatch script's server export.
alert field | Type | Content |
|---|---|---|
title | string | Translated title, "Fleeca robbery". |
message | string | Translated text with the name of the branch. |
bank | string | Name of the branch, for example 'Legion Square'. |
coords | vector3 | Position of the branch. |
code | string | Radio code, '10-90'. |
duration | number | Recommended lifetime of the alert, in seconds (600). |
blip | table | { sprite = 118, color = 1, scale = 1.2 }: red bank robbery blip. |
jobs | table | Police jobs from Config.police.jobs. |
police | table | Server ids of the officers on duty at that moment. |
Shipped file
It contains a ready-to-use example for lb-tablet, only used if lb-tablet is started. Add your dispatch the same way, before the final return false.
function CustomDispatch(alert)
if GetResourceState('lb-tablet') == 'started' then
for _, job in ipairs(alert.jobs) do
exports['lb-tablet']:AddDispatch({
priority = 'high',
code = alert.code,
title = alert.title,
description = alert.message,
location = { label = alert.bank, coords = vec2(alert.coords.x, alert.coords.y) },
time = alert.duration,
job = job,
blip = {
sprite = alert.blip.sprite,
size = alert.blip.scale,
color = alert.blip.color,
shortRange = true,
label = alert.title,
flashes = true,
},
})
end
return true
end
return false
endTemplate for another script, to adapt to its export:
if GetResourceState('my-dispatch') == 'started' then
exports['my-dispatch']:SendAlert({
title = alert.title,
message = alert.message,
coords = alert.coords,
jobs = alert.jobs,
})
return true
endStaff commands
Available in the server console and in game for players with the yf-fleeca.admin permission.
| Command | Effect |
|---|---|
fleecastatus | On-duty officers, and the state of each branch: free, in progress (duration, crew size) or resetting. |
fleecareset | Cancels the heists in progress and resets every branch. |
fleecareset <n> | A single branch: 1 Great Ocean Highway, 2 Boulevard Del Perro, 3 Hawick Avenue, 4 Alta Street, 5 Route 68, 6 Legion Square. |
Languages
Every text shown to players is in locales/, readable and editable. To add a language:
- copy
locales/en.luatolocales/de.lua; - replace
Locales['en']withLocales['de']and translate the sentences; - keep the
%sand%din the same order; - set
Config.locale = 'de'.
The plan vendor speaks French: in other languages, his lines are shown as subtitles. Item names are translated in items.lua.
Troubleshooting
"Not enough police on duty"
Check Config.police.jobs (exact job names) and minOnDuty. Without a framework, officers need the yf-fleeca.police permission. fleecastatus shows the number counted. To test alone, set minOnDuty = 0.
A yellow "config.lua: …" message at startup
A value in shared/config.lua is invalid: the message names it and shows the value used instead. Common causes: a price written in quotes, a position that is not a vec4, a missing comma between two locations. If no contact location is valid anymore, the bonus is disabled.
The wrong framework is detected
The console shows [yf-fleeca] framework : … at startup. Start YF-Fleeca after your framework, or force it with Config.framework.
"Access denied" on staff commands
The ACE permission is missing. Add add_ace group.admin yf-fleeca.admin allow (adapt the group to your server) then restart. Check with test_ace player.<id> yf-fleeca.admin in the console.
The cash pile or the pickup animation is missing
The game build is too old. Set sv_enforceGameBuild 2189 or higher.
Items have no image in the inventory
Check that the 11 yf_*.png files are in ox_inventory/web/images, then clear the FiveM cache: ox_inventory often keeps the old images.
No alert in my police tablet
Plug your dispatch into server/dispatch_custom.lua. If your code errors, the console shows erreur dans CustomDispatch and the built-in alert is sent instead.
The contact is nowhere to be found
That is normal outside the bonus: they only appear during a heist with a deposit box, or as long as a USB drive has not been delivered. Their NPC is only created within 60 m; follow the GPS route given when the box is drilled.
"You lack the required entitlement"
The resource is not linked to the Cfx.re account of your server key, or the folder was renamed. Download it from the Cfx.re portal with the account that bought it (see Getting your purchases) and keep the name YF-Fleeca.