L3THDocs

Scripts

Mailbox Robbery

A free, open-source mailbox robbery. Lightweight, synced between players and easy to make your own.

Requires
ox_lib
Frameworks
Any, custom frameworks can be added
Target & inventory
ox or qb target; ox, qb or ps inventory; or your own
Dispatch
tk, ps, cd or fd, or your own
Latest version 1.1.1 View in store

Free and open source. You can also get it on GitHub: github.com/L9th/l3th-mailrobbery

#Install

  1. #Install dependencies

    Install (or update) ox_lib, and start it before this script in your server.cfg.

    github.com/CommunityOx/ox_lib/releases

  2. #Pick your systems

    In configs/cl_config.lua:

    SettingOptions
    interaction'ox', 'qb' or 'custom'. Covers target, progress bar and notifications.
    minigame'sk-minigames', 'ox', 'glitch-minigames' or 'custom'
    dispatch'tk_dispatch', 'ps-dispatch', 'cd_dispatch', 'fd-dispatch' or 'custom'

    The inventory goes through bridge/inventory. Using something that isn't listed? Make your own in the utils and bridge folders.

  3. #Check the items

    Players rob a mailbox with a lockpick or a crowbar (WEAPON_CROWBAR), and can find a bank_card or a letter. These need to exist in your inventory. Change the names in the config files to use items you already have.

  4. #Start the script

    • Put the l3th-mailrobbery folder in your resources folder
    • Add ensure l3th-mailrobbery to your server.cfg, after its dependencies
    • Restart the server

#Configuration

#configs/cl_config.lua

SettingWhat it doesDefault
item, item2Items that can rob a mailboxlockpick, WEAPON_CROWBAR
duration, duration2How long robbing takes with each, in milliseconds10000, 8000
mailBoxesWhich mailbox props can be robbed6 props
maxDistanceHow close the player has to be1.4
policeChanceChance the police are called, in %20
policeChanceAddedExtra chance when using the crowbar, in %25
resetTimeSeconds before a mailbox can be robbed again1800 (30 min)
debugShows debug messages and zones. Set to false on a live server.

#configs/sv_config.lua

Reward is the loot table. Each entry has an item, a chance and an amount. An entry with item = nil is the chance of finding nothing.

Important

The chances have to add up to exactly 100.

#Need help?

Most issues come from a missing dependency or the wrong start order in server.cfg, so run through the steps once more first. Still stuck? See Common problems or open a ticket on Discord.