Home › Documentation › Robbery Requests · origen_ilegalv2
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 status in real time.
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.
The Robbery Requests tab only appears in the gang panel if origen_police is running. If the resource is stopped or not installed, the tab is hidden automatically.
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 Configuration. |
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. |
Config.RobberyRequest.Requests)Each entry in the list represents one type of robbery available to request.
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). |
id must be unique across all entries.minParticipants >= 1 and maxParticipants >= minParticipants.requiredCops >= 0, cooldownSeconds >= 0 and rejectedRequestCooldownSeconds >= 0.| 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). |
pending → approved | rejected | cancelled | expired
approved → cancelled | started | expired
started → (terminal)
rejected → (terminal — gang must acknowledge)
cancelled→ (terminal)
expired → (terminal)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.
request_robbery opens the gang panel and navigates to Robbery Requests.pending request already exists for the gang.origen_police and cached as pending.rejectedRequestCooldownSeconds) may still block re-requesting that specific robbery for some time; other robberies are unaffected.started).When Config.RobberyRequest.Anonymous = true:
gangLabel = "Anonymous" and requestedBy = "Anonymous".gangId is still transmitted internally so origen_ilegalv2 can validate ownership and cancellations.To reveal the gang identity to police, set Anonymous = false.
Use the server-side exports documented in Exports to gate robbery scripts behind a valid approved request:
-- Gate: only allow starting the robbery if approved
local res = exports['origen_ilegalv2']:GetRobberyRequestStatus(source, 'paleto_bank')
if not res.ok or res.status ~= 'approved' then
return -- block
end| 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 |