๐ Script Flow
Script Flow
This page explains the full gameplay flow of Train Heist from the player's perspective โ from joining the queue to delivering the looted cargo.
Overview
Train Heist is a queue-based criminal activity. Only one heist runs at a time; everyone else waits in line and is auto-started as soon as the slot frees up. A crew breaches the rail network, forces a cargo train to stop and raids its freight. The flow follows 8 sequential steps.
Join Queue โ Collect Vehicle โ Hack Antenna โ Crack Terminal โ Reach Interception โ Plant Device โ Raid Train โ Deliver CargoStep 1 โ Join the Queue
Players can join the heist queue through two methods:
- Laptop โ Open the devhub laptop, navigate to Train Heist under the Crime Traders category, and click to join the queue (
Shared.LaptopConfig.enabled). - NPC โ Walk up to the Rail Network Contact NPC (
Shared.PedSettings) and select "Start Heist" from the dialog.
Requirements
- Minimum police count must be met (
Shared.MinPolice). - No other heist may be in progress (only one runs at a time).
- The player must not be on personal cooldown (
Config.PersonalCooldownTime). - Any custom entries in
Shared.StartRequirements(items or custom checks) must pass.
Once in the queue, the player waits for their turn. A single heist is safety-capped at Config.MaxTaskTime (default: 20 minutes), after which the slot is force-freed for the next player.
Players can check their queue position at any time by talking to the NPC and selecting "Check Queue".
Step 2 โ Collect the Heist Vehicle
When the player's turn arrives, a waypoint to a depot appears on the map.
- The depot is picked at random from
Config.VehiclePickupLocations. - The heist vehicle spawns once the player is close.
- Getting into the vehicle begins the heist. Any items in
Shared.StartRequirementsflaggedconsume = trueare removed at this point.
Step 3 โ Hack the Antenna
A waypoint marks an antenna (Config.AntennaLocations). Travel there and hack the monitor to breach the rail network.
- Interacting brings up the antenna monitor on a fixed camera.
- Completing the hack generates an access code that you'll need at the terminal.
Step 4 โ Crack the Terminal
Go to the access terminal (Config.SecondHackLocation) and enter the code generated during the antenna hack.
- Enter the code on the second monitor; a short progress bar runs (
Config.CodeVerifyDuration). - On success the train route is confirmed and the interception point is revealed. An invalid code is rejected so you can try again.
Step 5 โ Reach the Interception Point
A waypoint marks the interception point (Config.InterceptionLocations). Drive there to set up the ambush.
Step 6 โ Plant the Device
Plant the device on the tracks to force the train to stop.
- The heist uses one of three scenarios at random (
Config.Scenarios): C4, Jammer or EMP. - Planting plays an animation and takes the scenario's
timer(default: 15 seconds). - The train spawns far out (
Config.TrainSpawnDistance) and is forced to stop just short of the interception point (Config.TrainStopDistance).
Step 7 โ Raid the Train
Once the train stops, raid the carriages. There are two kinds of loot:
- Pick-up loot โ use the Pick Up prompt on a loot prop. Picking up takes
Config.PickupDuration. The player then carries the item (a two-handed box-carry) and must bring it to the vehicle. Press X to drop it. - Searchable crates โ use the Search Crate prompt. Searching takes
Config.SearchDurationand rolls an item fromShared.SearchLoot.
To store cargo, open the vehicle trunk and load the carried item into the trunk grid (powered by devhub_grid). The on-screen cargo HUD shows how many items are loaded and whether the drop-off is unlocked yet.
Handling loot can tip off the police. Each pickup, search and load independently rolls a chance to alert the cops (Config.Police.callChance), with a per-player quiet window between calls (Config.Police.cooldownSeconds). This applies to anyone touching the loot, including teammates.
You must load at least Config.MinItemsToDeliver items (default: 5) before the drop-off can be completed. More cargo means a bigger payout.
Step 8 โ Deliver the Cargo
A waypoint marks the drop-off (Config.DropOffLocations). Drive the loaded vehicle there and complete the delivery.
- The vehicle must be brought close to the drop-off point.
- On completion the heist is finished and rewards are paid out.
Heist Complete
After delivery the player receives:
- The dynamic cargo payout โ the sum of the prices of all delivered loot props (
Shared.LootProps), paid asblack_moneyor cash depending onConfig.Payout. - The completion rewards โ a random cash amount and/or a random selection of items (
Config.CompletionRewards), handed out immediately. This does not require the laptop. - If the laptop integration is enabled, the Money, Crime Points and XP configured in
Shared.LaptopConfig.rewardsare collected from the laptop. - If
Shared.SkillTree.enabledis true, the player gainsShared.SkillTree.xpPerJobXP in the Crime Traders skill tree.
A personal cooldown (Config.PersonalCooldownTime, default: 10 minutes) begins before the player can join the queue again. The train and its props auto-clean after Config.TrainAutoDeleteTime, and the delivered vehicle is removed after Config.VehicleDeleteDelay.
Flow Diagram
โโโโโโโโโโโโโโโโโโโโ
โ Join the Queue โ (Laptop or NPC) โ one heist at a time
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Collect Vehicle โ Drive to a random depot, get in
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Hack Antenna โ Breach the network โ access code
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Crack Terminal โ Enter the code โ route confirmed
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Reach Interceptionโ Follow the waypoint
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Plant Device โ C4 / Jammer / EMP โ train stops
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Raid the Train โ
โ โธ Pick up loot props (carry them) โ
โ โธ Search crates โ
โ โธ Load cargo into the trunk grid โ
โ โธ Handling loot may alert the police โ
โโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Deliver Cargo โ Drive to the drop-off + hand over
โโโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Heist Complete โ Cargo payout + rewards + cooldown
โโโโโโโโโโโโโโโโโโโโThings That Alert the Police
The police are tipped off (via the TriggerAlarm hook in client.lua / server.lua, after a chance roll) when a player:
- Picks up a loot prop off the train (
Config.Police.callChance.pickup). - Searches a crate (
Config.Police.callChance.search). - Loads an item into the getaway vehicle (
Config.Police.callChance.load).
A per-player quiet window (Config.Police.cooldownSeconds) prevents a flood of calls while looting fast.
Skill Tree Effects
If devhub_skillTree is installed and Shared.SkillTree.enabled is true, players unlock perks in the laptop's Crime Traders skill tree that apply automatically:
| Channel | Effect |
|---|---|
xpBoost | More XP per completed heist |
fastHands | Pick up loot / search crates faster |
stealth | Lower chance to alert the police while raiding |
Players also earn Shared.SkillTree.xpPerJob XP each time a heist is completed.