Trailer Robbery

Trailer Robbery

$6.00

Add to Basket

Bring more action and realistic robbery opportunities to your ESX server with our Trailer Robbery Script! This script allows players to execute strategic heists on static truck trailers found all over the map. It's a perfect addition to any server economy looking for new criminal activities.

This script is designed from the ground up for stability, easy configuration, and maximum customizability.



Key Features


  • Police Requirement: Heists can only be started if a configurable number of police officers are on duty. This ensures fair and exciting roleplay!

  • Item Requirement: Players need a specific tool (e.g., a crowbar) to begin the break-in process.

  • Dynamic Object Detection: The script automatically finds all matching trailers on the map. You don't need to manually enter any coordinates!

  • Randomized Loot: You define which items can be found in the trailer and their probability. Every robbery is different!

  • Secure Stash System: Uses ox_inventory's server-side stash system to securely and reliably manage the loot.

  • Interactive Progress: An animated progress circle from ox_lib makes the break-in process immersive and engaging.

  • ESX Native: Fully integrated with ESX, using its native functions for maximum compatibility and performance.



🛠️ Installation & Configuration


Installation is incredibly simple:

  1. Download the script and place it in your resources directory.

  2. Add ensure trailer_rob to your server.cfg.

  3. Customize the config.lua to your liking (min police count, required item, loot table, etc.).

That's it! No complex database changes or deep code adjustments are necessary.



🔧 Advanced Customization


We know that every server is unique. That's why this script is built to let you easily swap out key systems:

  • Notification System: Adapt the notifications to your own system. In the client/cl_utils.lua file, you can integrate your preferred system (e.g., pnotify, okokNotify, esx_notify) with just one line of code.

  • Police Dispatch System: The police alert is also fully customizable. In the server/sv_utils.lua file, you can edit the alertPolice event to connect it with your dispatch system (ps-dispatch, cd_dispatch, Discord webhooks, etc.).



📦 Dependencies


Ensure the following resources are installed and working correctly on your server:

  • ESX Framework (tested with Legacy)

  • ox_lib

  • ox_inventory

  • xsound




📷 Screenshots

25151ceac202771c0c9ba04590b025914f2c8b44.png config.lua

a06782be874eef53d21a59f1950e478bef59acf6.png client/cl_utils.lua

eb4c26cb3e2590d46632009a332eecf0b38eee95.png server/sv_utils.lua

d31ab995b008fe5f157196f1eb0ca37a5545d4f6.png InGame (breaking into a trailer)