![[ESCROW] AI Law Enforcement | QB/QBOX/ESX](/_next/image?url=%2Fimages%2Fai-law-enforcement%2FAIP-1.webp&w=3840&q=75)
AI Law Enforcement
The Ultimate AI Police Experience for FiveM
Overview
Maintain law and order in your city—even when real cops are offline.
AI Law Enforcement is the ultimate AI police, arrest transport, and jail integration system built for QBCore, ESX Legacy, and Qbox servers. Powered by a robust Finite State Machine (FSM) and dynamic entity cleanup watchdogs, it provides continuous policing coverage with zero idle performance impact (0.00ms).
When player cops go offline, the AI automatically activates, monitoring native GTA offenses alongside custom activities (like hotwiring, lockpicking, corner selling, or any resource events). Wanted suspects face realistic pursuits, tactical pits, and dynamic transport arrivals. Once apprehended, players are cuffed, loaded into the back of an AI cruiser, and driven to jail in real time. They can either sit tight or attempt high-stakes escape minigames like lockpicking or hostage negotiation, or even try to bribe the officer to win back their freedom.
With a gorgeous, state-of-the-art React web admin dashboard, server owners can tune wanted levels, whitelist immune jobs, configure evasion minigame difficulties, and manage everything on the fly with live database-synced updates.
Key Features
FSM Dispatch & Patrols
Automated Finite State Machine cruisers spawn to pursue, pit-maneuver, and box-in suspect vehicles.
Event Scraping Engine
Automatically scans resource events on startup, logging them in database for custom wanted-level toggles.
React Admin Web UI
Sleek in-game React panel to manage active cop thresholds, evasion difficulty, bribes, and whitelists.
Interactive Arrest Flow
/surrender animations, manual cuffing, vehicle boarding, and physics geometry recovery loop.
Escape & Bribe Minigames
Active transport lockpicking minigame, hostage typing reaction challenge, or cash bribing systems.
Corpse Transport FSM
Corpse boarding, death state restoration, local resurrects to clear framework lockups, and jail on death.
Inventory & Input Locks
Closes ox/qb inventory screens, blocks weapon wheel, prevents jumping/sprinting while handcuffed.
Reconnect Protection
Database-persistent transport states restore cuffed players and auto-jail evaders on reconnection.
Detailed Script Features
FSM Dispatch & Smart Pursuits
AI cruisers deploy dynamically based on active cop counts. They patrol the city, respond to native or custom crimes, and initiate strategic pursuits with advanced driving maneuvers.

Interactive Surrender & Arrest Flow
Suspects can play a realistic hands-up or kneeling surrender stance. The dispatched officer executes boarding animations, cuffs the suspect, and guides them into the transport vehicle.

In-Transit Evasion & Bribery
Being captured isn't the end of the line. While in transit, players can attempt high-stakes minigames to kick open the cruiser door, negotiate with the officer, or pay a risky cash bribe.

Dynamic Event Scraping & Web UI
The ultimate tool for server owners. The script scans all server files on startup to find triggers, allowing admins to toggle them and set custom star levels from a gorgeous React panel.

Technical Specs
Requirements
Quick Setup
- 1Unpack the Tebex archive into your FiveM server's `resources/[osmfx]/osm-aipolice` directory.
- 2Import `aipolice.sql` to initialize the database tables `aipolice_events` and `aipolice_transport_pending`.
- 3Configure your framework, webhook links, and base wanted multipliers in `config.lua`.
- 4Add `ensure osm-aipolice` to your `server.cfg` configuration file.
- 5Start the server. The script will automatically scrape event triggers and synchronize settings.
Frequently Asked Questions
Version History
2026
- Added full compatibility for ESX Legacy (es_extended) with automatic framework detection
- Implemented ESX player state and inventory event bridges
- Optimized React admin panel whitelisting for ESX group and job permissions
2026
- Complete rebrand from 'AI Police Toggle' to 'AI Law Enforcement' with enhanced feature suite
- Added QBox framework support alongside QBCore with active state-bag synchronization
- Integrated advanced FSM-driven arrest boarding, corpse checking, and prisoner transport system
- Added 3 interactive transit evasion minigames: Lockpicking, Hostage Negotiation, and Cash Bribes
- Built a sleek React 18 + Tailwind admin panel (`/aipolice`) for active cop limits, whitelists, and event toggling
- Implemented database persistence for transport state to prevent combat logging and reconnection evasion
![[OPEN] OsmFX Vehicle Stickers | QB/QBX/ESX](/images/vehicle-stickers/vs-1.webp)
![[OPEN] AI Law Enforcement | QB/QBOX/ESX](/images/ai-law-enforcement/AIP-1.webp)