🪛MARKET ROBBERY

Note: This documentation covers all configuration options available to server owners. The script automatically detects your framework (ESX, QBCore, QBox) and requires no manual setup.


1) Overview

Risk Market Robbery is a dynamic store robbery system for FiveM servers featuring:

  • 🏪 21 pre-configured robbery locations across the map

  • ⏱️ Time-based robbery mechanics with progress tracking

  • 👮 Police notification system with GPS alerts

  • 💰 Configurable reward system (cash, black money, or items)

  • 🔒 Item/weapon requirements for robberies

  • 🌍 Multi-language support (6 languages included)

  • 📊 Discord webhook integration

  • 🎨 Fully customizable UI themes


2) Basic Configuration

Framework Detection

Config.Framework = nil

Leave as nil — The script automatically detects ESX, QBCore, or QBox

Language Selection

Available languages: 'de', 'en', 'pl', 'fr', 'pt', 'es'

Notification System

To use default notifications:

To integrate other notification systems:


3) Robbery Settings

Core Mechanics

Configuration details:

  • RobTime: Duration in seconds (900 = 15 minutes)

  • MinPolice: Minimum police officers required to start robbery

  • PoliceJobs: Job names that count as police

  • Cooldown: Time before store can be robbed again (600 = 10 minutes)

Time conversion reference:

Reward System

RewardType options:

  • 'cash' — Gives cash money

  • 'black_money' — Gives black/dirty money

  • 'item' — Gives item (specify in Config.RewardItem)

Global Limits

  • MaxSimultaneousRobberies: Maximum concurrent robberies server-wide

  • UseStreetNames: Display street names in notifications and webhooks

Distance Settings

  • InteractionKey: Key to interact (38 = E) — Key Codesarrow-up-right

  • InteractionDistance: Distance to show "Press E" prompt

  • MarkerDistance: Distance to render 3D markers

  • MaxDistance: Maximum distance before robbery auto-cancels


4) Requirements System

Item Requirements

How it works:

  • RequireItem: Player must have one of the listed items

  • RemoveItemOnUse: Remove item when starting robbery

  • RemoveItemAmount: How many items to remove

Example configurations:

No requirements:

Require lockpick (consumed):

Require lockpick (not consumed):

Multiple accepted items:

Weapon Requirements

How it works:

  • Player must have one of the listed weapons equipped (in hand)

  • Weapons are NOT consumed

  • Weapon must be actively held to start robbery

Common weapon hashes:


5) Visual Configuration

Map Blips

Blip customization:

  • sprite: Icon type — Blip Spritesarrow-up-right

  • color: Color ID (1 = red, 2 = green, 3 = blue, etc.)

  • scale: Size of blip

  • name: Text displayed on map

Popular blip sprites:

3D Markers

Marker types:

Color examples:

Robbery Radius Marker

Shows players the maximum distance they can move during robbery (visual boundary)

NPCs (Optional)

Popular NPC models:

Props/Objects (Optional)

Common prop models:


6) Police System

Police Configuration

How it works:

  1. System counts online players with police jobs

  2. Robbery can only start if MinPolice requirement is met

  3. All police receive GPS alert when robbery starts

  4. Police get notification if robbery is cancelled

Example configurations:

Low population server:

Medium server:

High population server:

Police Alerts

Police automatically receive:

  • 🚨 In-game notification with street name

  • 📍 GPS blip on map (lasts 60 seconds)

  • 🔔 Cancellation notification if robbery is aborted


7) Robbery Locations

Each location has coordinates and reward range:

Reward balancing tips:

  • Downtown locations: Lower rewards (easier police response)

  • Remote locations: Higher rewards (harder police response)

  • Balance based on your economy

Example reward ranges:

To add a new location:

To remove a location: Simply delete or comment out the entry:


8) Localization System

Selecting Language

Available languages:

  • 'de' — German

  • 'en' — English

  • 'pl' — Polish

  • 'fr' — French

  • 'pt' — Portuguese

  • 'es' — Spanish

Adding Custom Language

In locales.lua, add your language:

Then set:

Customizing Existing Strings

Edit any string in locales.lua:


9) Discord Webhooks

Basic Setup

To get a webhook URL:

  1. Open Discord server settings

  2. Go to "Integrations" → "Webhooks"

  3. Click "New Webhook"

  4. Copy webhook URL

  5. Paste into config

Bot Appearance

Avatar tips:

  • Use 512x512 px image

  • Upload to Imgur or similar

  • Use direct image link (.png, .jpg)

Embed Colors

Color conversion: Use SpyColorarrow-up-right to convert HEX to decimal

Popular colors:

Webhook Messages

Each webhook type has customizable fields:

To disable specific webhook types:


10) UI Theming

Customize colors in html/config.css:

Theme Examples

Red Theme (Dangerous):

Blue Theme (Professional):

Green Theme (Money):

Purple Theme (Elite):

Orange Theme (Action):

UI Scaling


11) Complete Configuration Examples

Example 1: Casual Server (Easy Robberies)

Example 2: Serious RP Server (Realistic)

Example 3: Hardcore Server (Very Difficult)

Example 4: PvP Server (Fast & Dangerous)


12) Troubleshooting

❌ "Not enough cops on duty!"

Cause: Less than Config.MinPolice officers online Solution:

  • Lower Config.MinPolice

  • Add more jobs to Config.PoliceJobs

  • Set to 0 for testing

❌ "Store recently robbed! Wait X minutes"

Cause: Store is on cooldown Solution:

  • Lower Config.Cooldown

  • Restart resource to reset cooldowns

  • Rob a different location

❌ "You need one of these items: X"

Cause: Config.RequireItem = true but player doesn't have item Solution:

  • Give item: /giveitem [id] lockpick 1

  • Set Config.RequireItem = false

  • Add more items to Config.RequiredItems

❌ "You need one of these weapons: X"

Cause: Config.RequireWeapon = true but weapon not equipped Solution:

  • Give weapon and equip it (hold in hand)

  • Set Config.RequireWeapon = false

  • Add more weapons to Config.RequiredWeapons

❌ "Too many robberies in progress!"

Cause: MaxSimultaneousRobberies limit reached Solution:

  • Increase Config.MaxSimultaneousRobberies

  • Wait for other robberies to complete

  • Default is 3, increase to 5-10 for busy servers

❌ "Too far away! Robbery cancelled"

Cause: Player left Config.MaxDistance radius Solution:

  • Increase Config.MaxDistance

  • Stay closer to robbery location

  • Consider disabling: Config.ShowRobberyRadiusMarker = false

❌ UI won't open

Possible causes:

  • Too far from location

  • Another player robbing same store

  • Item/weapon requirement not met

Solution:

  • Stand very close to marker

  • Check console for errors (F8)

  • Verify requirements are met

❌ No police notifications

Possible causes:

  • No players with police jobs online

  • Wrong job names in Config.PoliceJobs

Solution:

  • Verify job names match your framework

  • Add missing jobs to config

❌ Rewards not given

Possible causes:

  • Config.RewardType mismatch

  • Framework not detected

  • Config.RewardItem doesn't exist

Solution:

  • Check Config.RewardType setting

  • Verify framework is running

  • Test with 'cash' first

❌ Discord webhooks not sending

Possible causes:

  • Invalid webhook URL

  • WebhookConfig.UseWebhook = false

  • Webhook deleted from Discord

Solution:

  • Create new webhook in Discord

  • Copy full URL with token

  • Set WebhookConfig.UseWebhook = true

❌ Blips/markers not showing

Possible causes:

  • Config.UseBlips = false

  • Config.UseMarker = false

  • Too far from locations

Solution:

  • Set both to true

  • Approach robbery locations

  • Restart resource: /restart risk-marketrobbery


13) Best Practices

Balance robbery time with police count — Longer robberies need more police ✅ Test different reward ranges — Adjust based on your economy ✅ Use cooldowns on high-reward locations — Prevent farming ✅ Consider item consumption — Makes robberies more costly ✅ Place NPCs/props carefully — Avoid traffic or busy areas ✅ Test police alerts — Verify GPS blips appear correctly ✅ Use street names — Helps police respond faster ✅ Customize for server type — RP vs PvP need different settings ✅ Monitor Discord webhooks — Track patterns and adjust ✅ Regular config reviews — Update based on player feedback


14) Performance Tips

Disable unused features:

Increase distances carefully:

Optimize webhook calls:


15) Quick Start Checklist

  • [ ] Select language: Config.Locale

  • [ ] Set robbery duration: Config.RobTime

  • [ ] Configure police requirements: Config.MinPolice, Config.PoliceJobs

  • [ ] Set cooldown: Config.Cooldown

  • [ ] Choose reward type: Config.RewardType

  • [ ] Configure requirements: Config.RequireItem, Config.RequireWeapon

  • [ ] Adjust reward amounts in Config.Locations

  • [ ] Set up Discord webhooks (optional)

  • [ ] Customize UI colors in config.css

  • [ ] Test with 2 players (one criminal, one cop)

  • [ ] Restart resource: /restart risk-marketrobbery


16) How It Works

Robbery Flow

  1. Player approaches location → Sees marker/blip

  2. Presses E → Checks requirements and police count

  3. UI opens → Player clicks "START ROBBERY"

  4. Timer starts → Police receive GPS alert

  5. Player stays in radius → Progress bar runs

  6. Timer completes → Reward is calculated

  7. Player clicks "GRAB CASH" → Money added to account

  8. Location goes on cooldown → Can't be robbed again for X minutes

Security Features

  • ✅ Server-side validation for all actions

  • ✅ Distance checks prevent teleport exploits

  • ✅ Cooldown system prevents spam

  • ✅ Police count verified on start

  • ✅ Item/weapon checks server-side

  • ✅ Reward amounts stored server-side (not in NUI)

  • ✅ Player disconnect handling


Last updated