โš™๏ธRobbery Requests

The Robbery Request module lets gang members submit a formal robbery request to the police department directly from the gang panel. The police then approve or reject it, and the gang can see the statu

circle-info

This module is completely independent from origen_robberies. It does not start or manage the robbery itself โ€” it only handles the request/approval handshake between the gang and the police.

circle-exclamation

Configuration (config/robbery_request.lua)

config/robbery_request.lua
Config.RobberyRequest.Enabled              = true   -- enable/disable the entire module
Config.RobberyRequest.Permission           = 'request_robbery'
Config.RobberyRequest.Anonymous            = true
Config.RobberyRequest.PendingExpireMinutes = 15
Config.RobberyRequest.ApprovedExpireMinutes = 30
Key
Type
Default
Description

Enabled

boolean

true

Toggle the entire module. Even when true, the tab hides if origen_police is not started.

Permission

string

'request_robbery'

Rank permission required to submit and cancel requests. Leaders always have it. See Configurationarrow-up-right.

Anonymous

boolean

true

If true, the police panel shows "Anonymous" instead of the real gang name and requester name. The gang ID is still sent internally for validation.

PendingExpireMinutes

number

15

Minutes before a pending request expires if police do not respond. 0 = no expiry.

ApprovedExpireMinutes

number

30

Minutes before an approved request expires if the gang does not start the robbery. 0 = no expiry.

Robbery list (Config.RobberyRequest.Requests)

Each entry in the list represents one type of robbery available to request.

config/robbery_request.lua
Config.RobberyRequest.Requests = {
 
    {
        id                             = "small_robbery",
        label                          = "Small Robbery",
        image                          = "https://r2.fivemanage.com/.../small_rob.png",
        active                         = true,
        requiredCops                   = 1,
        minParticipants                = 1,
        maxParticipants                = 3,
        cooldownSeconds                = 900,
        rejectedRequestCooldownSeconds = 300,
    },
 
    {
        id                             = "medium_robbery",
        label                          = "Medium Robbery",
        image                          = "https://r2.fivemanage.com/.../med_rob.png",
        active                         = true,
        requiredCops                   = 4,
        minParticipants                = 2,
        maxParticipants                = 6,
        cooldownSeconds                = 1800,
        rejectedRequestCooldownSeconds = 600,
    },
 
    {
        id                             = "large_robbery",
        label                          = "Large Robbery",
        image                          = "https://r2.fivemanage.com/.../big_rob.png",
        active                         = true,
        requiredCops                   = 6,
        minParticipants                = 4,
        maxParticipants                = 6,
        cooldownSeconds                = 3600,
        rejectedRequestCooldownSeconds = 900,
    },
 
    -- add as many entries as needed
}
Field
Type
Description

id

string

Unique stable identifier for the robbery. Used in exports and status checks.

label

string

Display name shown in the gang panel.

image

string

Card image URL. Leave as "" for a placeholder.

active

boolean

If false, the entry is hidden from the panel and cannot be requested.

requiredCops

number

Minimum on-duty officers required to request this robbery.

minParticipants

number

Minimum participants the gang must declare (inclusive). Must be >= 1.

maxParticipants

number

Maximum participants (inclusive). Must be >= minParticipants.

cooldownSeconds

number

Wait time (seconds) after completing the robbery before this same robbery can be requested again (uses origen_robberies). 0 = no cooldown.

rejectedRequestCooldownSeconds

number

Time (seconds) the gang must wait before requesting this robbery again after the police reject it. Only blocks this robbery; others are unaffected. 0 = no rejection cooldown (the gang can request again immediately after marking the rejection as read).

Validation rules

  • id must be unique across all entries.

  • minParticipants >= 1 and maxParticipants >= minParticipants.

  • requiredCops >= 0, cooldownSeconds >= 0 and rejectedRequestCooldownSeconds >= 0.

Request states

State
Description

pending

Submitted, waiting for a police response.

approved

Approved by police. The gang has ApprovedExpireMinutes to start.

rejected

Rejected by police. The gang must acknowledge the rejection before re-requesting.

cancelled

Cancelled by a gang member with request_robbery permission.

expired

Timed out without a response (pending) or without starting (approved).

started

The robbery started (terminal โ€” set by origen_police).

Allowed transitions

rejected is not immediately terminal in the gang cache. It stays visible until the gang member acknowledges it (button in the panel), which then clears the entry and allows re-requesting.

Gang-side flow

  1. A member with request_robbery opens the gang panel and navigates to Robbery Requests.

  2. They select a robbery, choose the number of participants, and submit.

  3. The server validates: cooldown, cops online, participant range, and that no pending request already exists for the gang.

  4. If valid, the request is forwarded to origen_police and cached as pending.

  5. Status updates arrive in real time โ€” the NUI reflects changes without the player refreshing.

  6. If rejected, the panel shows the rejection reason (provided by police). The member must tap the dismiss button to clear it. After acknowledging, a per-robbery cooldown (rejectedRequestCooldownSeconds) may still block re-requesting that specific robbery for some time; other robberies are unaffected.

  7. If approved, the gang has the configured time to initiate the robbery.

  8. If the gang wants to abort, they can cancel (any state except started).


Anonymous mode

When Config.RobberyRequest.Anonymous = true:

  • The police panel receives gangLabel = "Anonymous" and requestedBy = "Anonymous".

  • The gangId is still transmitted internally so origen_ilegalv2 can validate ownership and cancellations.

  • The police UI must not expose the real gang identity.

To reveal the gang identity to police, set Anonymous = false.


Checking request status from external scripts

Use the server-side exports documented in Exports to gate robbery scripts behind a valid approved request:

Troubleshooting

Symptom
Cause
Fix

Tab not visible in gang panel

origen_police is not started

Start origen_police before origen_ilegalv2

"Police unavailable" error on submit

origen_police stopped mid-session

Restart origen_police; the cache is cleared automatically

Gang stuck with a pending request

Police did not respond before PendingExpireMinutes elapsed

Request will auto-expire; lower PendingExpireMinutes if needed

Cannot re-request after rejection

Rejection not acknowledged, or rejectedRequestCooldownSeconds still active

Dismiss the rejection notification first; if a cooldown is configured, wait for it to expire (only blocks the same robbery)

Cooldown still active after restart

Cooldown is in-memory only and resets on resource restart

Expected behavior โ€” no persistent cooldown across restarts

Last updated