How to Install SleepyCode Bus Job on FiveM ESX
Step-by-step install guide for SC Bus Job - ESX public transport script for FiveM. Dependencies, server.cfg, pay-per-stop config and multipliers.
SC Bus Job is a public-transport roleplay script for FiveM ESX servers. Players pick up NPC passengers at configurable bus stops, follow routes, and earn per-stop pay with night and weekend multipliers. The script tracks smooth driving, accidents, and speeding - rewarding careful drivers with bonus pay.
> Framework: ESX Legacy 1.20 or higher only. This script does not support QBCore, QBox, or Standalone.
Dependencies
| Resource | Minimum version |
|---|---|
| ESX Legacy | 1.20 |
| ox_lib | latest |
| ox_target | latest |
| oxmysql | latest |
All three overextended resources are available at github.com/overextendedgithub.com/overextendedhttps://github.com/overextended.
Installation Steps
1. Download and place the resource
After purchasing from the SleepyCode store and downloading via Keymaster, extract the folder and place it in your server's resources directory.
2. Add to server.cfg
Dependencies must start before the script:
ensure ox_lib
ensure ox_target
ensure oxmysql
ensure sc_busdriver3. Database tables
No manual SQL import is required. The script automatically creates all necessary database tables on its first launch.
4. Configure the script
Two config files to edit:
- config.lua - client-side settings (distances, payment, penalties, zones)
- config_server.lua - server-side settings
5. Restart and test in-game
After a server restart, head to the job NPC location defined in Config.Zone.Job and the ox_target label should appear.
Job & Check Settings
Config.Job = "unemployed" -- ESX job name required to use the script
Config.CheckJob = true -- set false to allow any player to work as a driver
Config.Debug = true -- enable server console debug outputSet Config.CheckJob = false if you want the bus job to be available to all players regardless of their ESX job.
Payment Structure
Config.Payment = {
Stop = { Min = 35, Max = 55 }, -- base pay per completed bus stop
Passenger = { Min = 8, Max = 15 }, -- extra pay per passenger on board
Bonus = { Min = 150, Max = 300 }, -- bonus at the end of a completed route
Perfect = 200, -- additional bonus for a perfect route score
Night = 1.5, -- pay multiplier between 22:00–06:00
Weekend = 1.25, -- pay multiplier on Saturday and Sunday
}A driver completing a stop with 5 passengers during a Friday night shift earns roughly:
- Stop pay: ~45 base
- Passenger bonus: ~55 (5 × ~11)
- Night multiplier ×1.5 applied to total
Penalty System
Config.Penalty = {
Accident = 50, -- fine per accident
Missed = 75, -- fine for missing a bus stop
Speed = 25, -- fine per speeding violation
Damage = 100, -- fine for vehicle damage
DamageThreshold = 50, -- damage level before fine triggers
MaxDamageReduction = 0.60, -- penalties can reduce pay by at most 60%
StopTimeout = 100, -- fine if stop time limit expires
}Speed Limit & Driving Score
Config.SpeedLimit = 110 -- km/h - exceeding this triggers a speeding fine
Config.SmoothDrivingThreshold = 95 -- score required for a "perfect route" bonus
Config.MaxAcceleration = 5.0 -- sudden acceleration thresholdStop Time Limit
Config.StopTimeLimit = 300 -- seconds the driver has to reach the next stopIf a driver fails to reach the next stop within 300 seconds, they receive the StopTimeout penalty fine.
NPC Passengers
Config.NPC = {
SpawnDistance = 200, -- how far NPCs spawn from the stop (metres)
MinSpawn = 2, -- minimum waiting passengers at each stop
MaxSpawn = 8, -- maximum waiting passengers at each stop
LineSpacing = 1.2, -- spacing between queued NPCs (metres)
MaxExitPerStop = 5, -- max NPCs that exit at any single stop
}Cooldowns
All cooldowns are in milliseconds:
Config.Cooldown = {
Spawn = 3000, -- delay between bus spawns
Delete = 2000, -- delay before bus is deleted on return
Route = 2500, -- cooldown between route actions
Stop = 1000, -- cooldown between stop actions
}Zone Coordinates
Config.Zone = {
Job = vec4(451.24, -629.42, 28.53, 260.03), -- NPC and ox_target location
Spawn = vec4(459.36, -649.14, 28.13, 212.80), -- where the bus spawns
ReturnPoint = vec4(459.36, -649.14, 28.13, 212.80), -- where drivers return the bus
}To move the job to a different part of the map, update all three vec4 coordinates in this section.
Bus Outline Colour
Config.BusOutline = { R = 255, G = 220, B = 0, A = 255 } -- yellow highlightInteraction Distances
Config.Distance = {
Interact = 50.0, -- radius of the job interaction zone
Spawn = 5.0, -- minimum distance from other vehicles before bus spawns
Stop = 15.0, -- radius for detecting when a player reaches a bus stop
Accident = 10.0, -- radius used for accident detection
}Routes
Bus routes are defined in bus-job-vehicle-routes. Each route specifies a list of stops with coordinates. You can add custom routes or modify existing stops by editing the routes file directly.
Common Issues
Job NPC not appearing - Check that ox_target starts before sc_busdriver in server.cfg.
Players can't pick up the job - If Config.CheckJob = true, the player's ESX job name must match the value in Config.Job.
Database table missing - Let the resource start at least once and check the server console for any oxmysql errors. The table is created automatically.
Bus not spawning - Make sure there is enough space at Config.Zone.Spawn. Another vehicle within 5 metres will block the spawn.
Support
Join the SleepyCode Discord at discord.gg/qCDt8u7Efgdiscord.gg/qCDt8u7Efghttps://discord.gg/qCDt8u7Efg for help. Include your ESX Legacy version, ox_lib version, and any console errors. Purchase the script at sleepycode.eu/scriptssleepycode.eu/scripts/scripts.