Description
ac-pedinteraction is a police–pedestrian interaction system designed for immersive patrol roleplay on QBCore servers.
The script allows police officers to interact with ambient pedestrians anywhere in the world using qb-target or ox_target.
Each NPC is handled server-side and receives its own generated identity, inventory state, and behavior, ensuring that interactions cannot be repeated or abused.
This resource was created to make patrols feel more alive without relying on static NPCs or scripted locations.
Important notice
I want to clarify that this resource is designed for QBCore only.
Newer versions of ox_inventory no longer support QBCore and are intended for QBox or ESX. Using this resource with QBox or newer ox_inventory versions may cause errors.
Apologies for not clearly stating this earlier. This has now been added to avoid confusion.
Features
- Police-only interactions with ambient pedestrians
- Server-side NPC ownership using NetIDs (prevents double interaction abuse)
- Generated ID cards with in-game rendered portraits
- Randomized NPC inventories (legal & illegal items)
- Frisk system with configurable outcomes
- Arrest system with multiple scenarios
- NPCs may flee when illegal items are found
- Optional taser-based suspect stopping
- Supports qb-target and ox_target
- Supports qb-inventory and ox_inventory
Gameplay Example
- Officer targets a pedestrian
- Interaction menu opens
- Officer checks ID or frisks NPC
- If illegal items are found:
- NPC may attempt to flee
- Officer must stop the suspect
- Arrest removes the NPC from the world
All behaviors can be configured or disabled depending on server policy.
Requirements
- QBCore
- qb-menu
- qb-target or ox_target
- qb-inventory or ox_inventory
Configuration
The resource is fully configurable:
- Select target system (qb-target / ox_target)
- Select inventory system (qb-inventory / ox_inventory)
- Configure:
- NPC item pools
- Legal and illegal items
- Generated name pools
- NPC behavior (fleeing, arrest outcomes)
Performance
- Targets are only created within interaction range
- NPC data is cached per entity
- All critical logic is server-authoritative
Optimized for live servers.
Preview
Distribution
This resource is free and immediately available.
- Download via forum attachment:
ac-pedinteraction.zip (113.3 KB) - Source repository available on GitHub for transparency and contributions:
GitHub - AlexCarton/ac-pedinteraction: A configurable police interaction script for QBCore servers. · GitHub
(No Discord or account requirement to use the resource.)
Required Information (Code Resource)
| Code is accessible | Yes |
| Subscription-based | No |
| Lines (approximately) | ~900 |
| Requirements & dependencies | QBCore, qb-menu, qb-target / ox_target |
| Support | Yes |
Assets Information
| Assets are accessible | Yes |
| Subscription-based | No |
| Polygons (model and LOD) | N/A |
| Texture size and amount | 1x YTD (106 KB) |
| Requirements & dependencies | None |
| Support | Yes |
