Bablo ResourcesDocs

General information

Most errors come from a bad update or hand-edited code. If you hit an error that isn’t covered here, test with the default resource first.

Which frameworks are supported?
ESX (es_extended), QBCore (qb-core) and Qbox (qbx_core). The framework is detected on its own at startup (Config.Framework = 'auto'), and the script waits up to 5 seconds for one of them to start. Make sure the framework starts before bablo-electricjob. See Configuration.
Which dependencies are required?
ox_lib and OneSync. The resource does not start without them. Nothing else is required.
Do I need to import any SQL?
No. The job uses no database and does not need oxmysql. Routes built in game are saved in data/placements.json inside the resource. The tips each character has seen and the payout records are kept in the server’s own resource storage (KVP). Where a player moved the mission panel to is saved in that player’s game.
Do I need any items or an inventory?
No. The job uses no items. The tools come with the work order and the van is handed out at the depot. Config.Inventory is not used by the job.
Which target and prompt resources are supported?
Target: ox_target and qb-target. Without either, players use a built-in [E] prompt within 2.5 metres. Detected on their own, or forced with Config.Target. Detection looks for a started resource named exactly ox_target or qb-target.
Every interaction is a target option. At the dispatcher: Electrician work orders, Collect work van and Return van and get paid. At a box: Open service cabinet or Open fuse box, Monitor the circuit and Stop monitoring.
The bridge files are in src/interactions and are open. See Configuration.
Which notifications are supported?
Your framework’s notifications (QBCore, Qbox or ESX), the ox_lib notifications or the GTA notification feed, chosen with Config.Notify. If the framework notification fails, the GTA feed is used. While a player is working on a box, messages show on the screen of that box instead. The bridge is frameworks/notification/client.lua and is open. See Configuration.
Which vehicle key resources are supported?
qbx_vehiclekeys, Renewed-Vehiclekeys, wasabi_carlock, qs-vehiclekeys, tgiann-hotwire, cd_garage and qb-vehiclekeys. The first one of them that runs, in that order, gives every crew member the keys to the work van. Without any of them no keys are handed out, and the van is left unlocked. The bridge is frameworks/vehiclekeys/client.lua and is open. See Work Van.
How do crews work and how is the pay split?
A crew has up to four players (Config.Job.maxMembers). The leader starts one at the dispatcher, or simply invites a nearby player: inviting without a crew creates the crew automatically. Invitations pop up in the middle of the screen of the invited player.
The route payout plus a crew bonus (10, 20 or 30 percent for 2, 3 or 4 players) is split evenly over the crew that started the work order. Each member is paid when the leader returns the van at the depot. See Crews & Invites and Payouts.
Can I limit the job to players with a certain job?
By default every player can take work orders. To limit it, edit Framework:canDoMission in frameworks/<framework>/server.lua. It is asked when a leader starts a work order and when a player joins a crew. Return false and a reason to refuse. See Exports & Hooks.
Who can build routes?
Players with the ACE in Config.Placement.ace (default command.electricplacer). They open the route creator with /electriceditor. See Installation and Route Creator.
Where are the routes stored?
The routes in config.lua are the defaults. Routes and boxes you build with the route creator are saved in data/placements.json and added to them. A box you move or delete in the creator replaces the one in config.lua. The resource ships with ready-made service rounds in this file. The server must be able to write to it.
If the file cannot be read, only the routes in config.lua are used and the route creator does not open. It shows Saved placements could not be read. Check the server log before editing.

Back up data/placements.json before you update the resource. If you replace the whole resource folder, the file is replaced too and your own routes are gone.

Do I need a map or MLO?
No. The breaker cabinets and fuse boxes are props that come with the resource. The server places one at every box location when the resource starts, so they stand in the world for everyone, also when nobody is working on them.
Does the job work in other routing buckets?
No. Players have to be in the main world (routing bucket 0) to take work, repair boxes and use the route creator. Elsewhere they get Return to the main world before working this job.
Does the work outfit work with every ped?
No. The outfit is only put on the GTA freemode characters (mp_m_freemode_01 and mp_f_freemode_01). Players with any other ped keep their clothes. See Work Outfit.
What does Config.DEBUG do?
It makes repairs short (one round at a breaker cabinet, one blown fuse in a fuse box) and prints extra lines in the server console and the F8 console. It is meant for testing. Keep Config.DEBUG = false on a live server.
Can I change the texts or add a language?
Yes. The texts of the menus, the mission panel, the tips and the route creator are in locales/en.json. English and Swedish are included. See Languages.
Can I change the colours?
Yes, with Config.Theme in config.lua. See Theme.
Which files can I edit?
config.lua, everything in frameworks/, the language files in locales/ and the target bridges in src/interactions/ are open. The rest of the script is escrowed. Routes are best changed with the route creator, not by editing data/placements.json by hand. See the Script Explorer.