Skip to content

TeamDynamic-Scripts/dynamic-parkingrobbery

Repository files navigation

Dynamic Parking Meter Robbery Script for QBCore

A comprehensive FiveM script that allows players to rob parking meters using a crowbar, with support for multiple banking and dispatch systems.

Features

  • Rob parking meters with weapon_crowbar
  • Prop-specific detection - Works with ALL parking meters automatically
  • Optional zone restrictions - Blacklist or whitelist specific areas
  • Configurable payout amounts
  • Cooldown system to prevent spam
  • Multiple inventory system support (qb-inventory, ox_inventory)
  • Multiple banking system support (qb-banking, okokBanking)
  • Multiple dispatch system support (ps-dispatch, cd_dispatch, rcore_dispatch)
  • Street name detection for police alerts
  • Minimum police requirement
  • Progress bar with cancel option
  • Item durability support (optional)
  • Target system or key press support
  • Fully configurable

Supported Systems

Inventory Systems

  • qb-inventory (default QBCore)
  • ox_inventory

Banking Systems

  • qb-banking (default QBCore)
  • okokBanking

Dispatch Systems

  • ps-dispatch
  • cd_dispatch
  • rcore_dispatch
  • Custom fallback system (if no dispatch installed)

Target Systems

  • qb-target
  • ox_target
  • Key press (fallback)

Installation

  1. Download and extract the dynamic-parkingrobbery folder to your resources directory

  2. Add to your server.cfg:

ensure dynamic-parkingrobbery
  1. Add the crowbar item to your qb-core/shared/items.lua:
['weapon_crowbar'] = {
    ['name'] = 'weapon_crowbar',
    ['label'] = 'Crowbar',
    ['weight'] = 2500,
    ['type'] = 'weapon',
    ['ammotype'] = nil,
    ['image'] = 'weapon_crowbar.png',
    ['unique'] = true,
    ['useable'] = false,
    ['description'] = 'A heavy crowbar, useful for prying things open'
},
  1. Configure the script in config.lua (see Configuration section below)

  2. Restart your server

Configuration

Open config.lua and adjust settings to your preference:

General Settings

Config.CooldownTime = 300000 -- Cooldown between robberies (5 minutes)
Config.RobberyTime = 10000 -- Time to rob a meter (10 seconds)
Config.PoliceAlertChance = 75 -- Chance to alert police (75%)
Config.MinPayout = 50 -- Minimum payout
Config.MaxPayout = 150 -- Maximum payout
Config.RequiredItem = "weapon_crowbar" -- Item needed
Config.MinimumPolice = 0 -- Minimum police online

Inventory System

Config.InventorySystem = 'qb-inventory' -- Options: 'qb-inventory', 'ox_inventory'

Banking System

Config.BankingSystem = 'qb-banking' -- Options: 'qb-banking', 'okokbanking'

Dispatch System

Config.DispatchSystem = 'ps-dispatch' -- Options: 'ps-dispatch', 'cd_dispatch', 'rcore_dispatch', 'none'

Police Jobs

Config.PoliceJobs = {
    'police',
    'sheriff',
    -- Add more police job names if needed
}

Zone Restrictions (Optional)

The script is prop-specific and works with all parking meters automatically!

You can optionally restrict certain areas:

Config.UseZoneRestrictions = false -- Disabled by default (recommended)

-- If enabled:
Config.ZoneMode = 'blacklist' -- or 'whitelist'

-- Example: Prevent robberies near Mission Row PD
Config.BlacklistZones = {
    {
        coords = vector3(425.1, -979.5, 30.7),
        radius = 100.0,
        label = "Mission Row PD"
    }
}

See ZONES.md for complete zone configuration guide.

Target System

Config.UseTarget = true -- Use target system?
Config.TargetSystem = 'qb-target' -- Options: 'qb-target', 'ox_target'

If you don't use a target system, set Config.UseTarget = false and it will use key press (E by default).

Banking System Setup

QB-Banking (Default)

No additional setup required. The script uses QBCore's built-in money functions.

okokBanking

  1. Set Config.BankingSystem = 'okokbanking'
  2. Ensure you have okokBanking installed and working
  3. The script will automatically add money using okokBanking's export

Dispatch System Setup

PS-Dispatch

  1. Set Config.DispatchSystem = 'ps-dispatch'
  2. Ensure ps-dispatch is installed
  3. Configure Config.PSDispatchBlip settings in config.lua
  4. Make sure police jobs have type = 'leo' in qb-core/shared/jobs.lua
  5. See PS-DISPATCH.md for detailed integration guide

CD-Dispatch

  1. Set Config.DispatchSystem = 'cd_dispatch'
  2. Ensure cd_dispatch is installed
  3. Configure Config.Blips settings in config.lua
  4. Make sure police jobs match your server's job names exactly
  5. See CD-DISPATCH.md for detailed integration guide

RCore Dispatch

  1. Set Config.DispatchSystem = 'rcore_dispatch'
  2. Ensure rcore_dispatch is installed
  3. Configure Config.Blips settings in config.lua
  4. Make sure police jobs match your rcore_dispatch CONFIG.JOBS exactly
  5. Players must be in a unit to receive alerts (or enable AlwaysSubscribeAlertWithoutUnit)
  6. See RCORE-DISPATCH.md for detailed integration guide

No Dispatch / Custom

  1. Set Config.DispatchSystem = 'none'
  2. The script will use a fallback system that sends alerts directly to online police

Item Durability (Optional)

If you want crowbars to degrade with use:

Config.ItemDurability = true

This requires your inventory system to support item metadata/quality. Each robbery will reduce the crowbar's quality by 10%.

Remove Item on Use (Optional)

If you want the crowbar to be consumed after use:

Config.RemoveItemOnUse = true

Admin Commands

  • /clearmetercd - Clear all parking meter cooldowns (Admin only)

Troubleshooting

Players can't rob meters

  • Ensure they have the weapon_crowbar item
  • Check that minimum police requirement is met
  • Verify the meter hasn't been robbed recently (cooldown)

Police not receiving alerts

  • Check that Config.DispatchSystem is set correctly
  • Verify police jobs are listed in Config.PoliceJobs
  • Ensure police are on duty (if applicable)
  • Check dispatch script is installed and working

Money not being added

  • Verify Config.BankingSystem is set correctly
  • Check server console for errors
  • Ensure banking resource is running

Target not working

  • Verify Config.UseTarget = true
  • Check Config.TargetSystem matches your installed target
  • Ensure target resource is running

Debug Mode

Enable debug mode to see console logs:

Config.Debug = true

This will print useful information to help troubleshoot issues.

Credits

Created for QBCore Framework

Support

For issues and support, please check:

  1. Server console for errors
  2. Config.lua settings are correct
  3. All dependencies are installed
  4. Enable Debug mode for detailed logs

License

This script is open source and free to use.


License & Contributing

This resource is source-available, all rights reserved under the Dynamic Scripts Proprietary License. You may view the code, but you may not redistribute, resell, or publish modified or "improved" versions.

Found a bug, fix, or improvement? Please don't fork or republish - instead DM the author at wax@waxthe.dev, and it may be incorporated (with credit).

About

Dynamic parking-meter robbery for FiveM (QBCore).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages