MFPD SCRIPTS • AI POLICE BACKUP
MFPD-PoliceCompanion
Your squad. Your formation. Your command.
Bring AI police backup into your patrols with custom formations, verified threat response, add-on weapon support, vehicle support, and direct squad controls.
10 COMPANIONS • CUSTOM FORMATIONS • EUP CLOTHING SUPPORT • ADD-ON WEAPONS
SEE IT IN ACTION
Video previews
Explore six gameplay clips using the direct video links below.
PREVIEW 01
Watch MFPD-PoliceCompanion gameplay preview 1 →
Open the direct MP4 video.
PREVIEW 02
Watch MFPD-PoliceCompanion gameplay preview 2 →
Open the direct MP4 video.
PREVIEW 03
Watch MFPD-PoliceCompanion gameplay preview 3 →
Open the direct MP4 video.
PREVIEW 04
Watch MFPD-PoliceCompanion gameplay preview 4 →
Open the direct MP4 video.
PREVIEW 05
Watch MFPD-PoliceCompanion gameplay preview 5 →
Open the direct MP4 video.
PREVIEW 06
Watch MFPD-PoliceCompanion gameplay preview 6 →
Open the direct MP4 video.
Build your police squad
Build your own AI police squad with MFPD-PoliceCompanion. Request up to 10 active companions per player, copy your character's clothing and weapons (add-on weapons and attachments included), arrange your squad in custom formations, and bring backup along on foot or in a vehicle. Each companion carries one long gun and one sidearm taken from your loadout and keeps a single firearm in hand through a fight. Companions respond to verified hostile attacks against you or your squad, share threat awareness, spread across multiple attackers, and hold their target until the threat is down. Hold-position, manual aiming, cease-fire controls, area patrols, patrol torches, and an in-game command guide give you control over how your squad operates.
SQUAD CONTROLS
Every command at a glance
| Command / default key | What it does |
|---|---|
| /mfpd | Request one companion at a time with your appearance and weapons; maximum 10 active companions per player. |
| /bye | Dismiss your entire squad. |
| /stay · J | Toggle hold position and following. Companions hold their spot and defend it from where they stand. Recalls companions when deployed. |
| /pullcomp | Recover companions by teleporting them near your current position. |
| /compstatus | Show companion count and current operating state, including combat. |
| /formation | Open the visual formation editor and shared presets. |
| /helpcomp | Open the searchable companion command guide. |
| /mfpdaim · H | While on foot and free-aiming at a valid entity, toggle squad aim on that target. |
| /stp | Toggle cease-fire: companions aim at verified threats without firing, and keep following when no threat is present. |
| /dep | Deploy your squad to patrol the surrounding area; use again to recall. |
| /ptrfoot | Toggle patrol torches for companions on foot. |
| /ptrcar | Toggle patrol torches for companions riding in your vehicle. |
Command names are editable in config/config.lua. Aim, stay, and deployment controls can be assigned through FiveM key bindings.
During combat: use /stp or /stay to interrupt an engagement before issuing deployment, pull, manual aim, or torch commands.
WHAT YOUR SQUAD CAN DO
Features and behavior
FEATURE 01
Visual Formation Editor and Shared Presets
- Position companions around the player using a drag-and-drop formation grid.
- Fine-tune left/right, forward/back, and vertical offsets with numeric controls.
- Use grid zoom, arrow-key adjustments, restore, and reset controls to edit your layout.
- Save individual player formations for reuse across sessions.
- Create, load, update, and delete named formation presets shared across the server.
- Companions hold their assigned offsets and switch between walking and running with the player, with smooth, continuous following.
- A companion that falls behind or gets blocked by the environment automatically picks up the formation again.
FEATURE 02
Verified Threat Response and Stable Combat Targets
- Combat response requires evidence of a hostile NPC attacking, firing toward, engaging in melee with, or damaging the player or squad.
- Nearby gunfire alone does not authorize engagement. Optionally, servers can list relationship groups whose armed members are always treated as threats within a configurable distance (useful for war or gang-war game modes).
- The whole squad scans for threats twice per second and shares one threat memory, so every companion, including those added during an ongoing fight, recognizes the same attackers.
- Multiple attackers are tracked at once and companions spread out across them instead of all choosing the same target.
- Each companion keeps one target and one combat order until that threat is down or leaves the tracking range; a companion that loses its engagement automatically re-engages.
- Engagement uses configurable distance, tracking, and on-foot or in-vehicle engagement ranges.
- Combat takes priority over following, vehicle boarding, patrols, and torch animations. Use
/stpor/stayto interrupt an engagement. - In hold-position mode companions defend their spot, returning fire without leaving their position.
- After a short quiet period with no threats, companions return to following, holding, or their deployed patrol, according to the active squad mode.
FEATURE 03
Weapon Kit, Add-on Weapons, and Combat Firearm Control
- Each companion carries a clean two-weapon kit taken from your loadout: one long gun (rifle, carbine, SMG, shotgun, MG, or sniper) and one sidearm.
- Weapons are recognized by their weapon type, so add-on weapons work out of the box without being listed one by one. A bundled weapon catalog and the weapons you are seen holding are used to find what you carry.
- Attachments are copied from your own weapons: scopes, sights, suppressors, grips, lights, magazines, and add-on components, plus weapon tint.
- Companions follow the firearm you settle on: hold a rifle and they bring out their rifles, holster to a pistol and they switch to sidearms. A short configurable delay keeps them from reacting to quick weapon-wheel scrolling.
- During combat the kit is locked: each companion keeps a single firearm in hand for the whole fight.
- The game's automatic weapon switching is disabled for companions; the script alone decides what they hold.
- Unlimited reserve ammunition (configurable), so companions reload magazines but never run dry mid-fight.
- Melee weapons, throwables, tasers, less-lethal launchers, and heavy weapons are never used as a companion firearm. The exclusion list is configurable.
- A configurable fallback sidearm is issued when you carry no suitable firearm.
FEATURE 04
Manual Aim and Cease-Fire Controls
/mfpdaimor H by default - while on foot and free-aiming at a valid entity, order companions to hold aim on that target.- Toggle manual aim again to stand down. Aim mode also ends automatically if the target dies or disappears.
- Manual aim requires an entity target; empty surfaces and friendly units never create a target lock.
/stp- toggle cease-fire mode: companions keep identifying threats and aim at them, but never fire.- With no threat present during cease-fire, companions keep following you in formation. Newly added companions are also governed by the active cease-fire state.
FEATURE 05
Area Deployment and Patrol Torches
/dep- deploy companions to patrol around the location where the command is issued. Use it again to recall them.- Companions disembark from the player's vehicle when deployed, engage threats while on patrol, and resume patrolling afterwards.
- Patrol radius, travel length, and rest time can be adjusted in the configuration.
/ptrfoot- toggle patrol torch animations for companions on foot./ptrcar- toggle patrol torch animations for companions seated in the player's vehicle.- Randomized patrol animations are synchronized through the server, and every player sees the torch props and the torch light beam.
- Torch props are tracked per companion from the moment they are created and are fully removed when the mode is cancelled, interrupted, or the companion leaves.
- Torch light reach, brightness, beam shape, and color have configurable settings.
- Active torch mode transitions between on-foot and vehicle patrol as the player enters or leaves a vehicle.
- Weapons are stowed while the torch is out and drawn again when the mode ends. Use the current torch-mode command again to cancel it; combat ends torch mode automatically.
FEATURE 06
Vehicle Support
- Companions run to the player's vehicle and board automatically while following, and get out when the player does.
- Free passenger seats are assigned automatically without two companions claiming the same seat.
- A companion that cannot reach its seat within the boarding time is placed into it, so nobody is left behind.
- Seat-aware weapons: in enclosed passenger seats companions use SMGs, shotguns, or their sidearm, while bikes, boats, and open seats allow every long gun.
- Companions fire from the vehicle at verified threats and return to their on-foot weapon after disembarking.
FEATURE 07
Freemode, Add-on Peds, and EUP Clothing
- Supports male and female freemode companion models.
- When you play as an add-on human ped, your companions use the same model and copy its clothing and props.
- Copies the player's clothing components and props, including compatible installed EUP clothing.
- On freemode models, copies hair style and colors, eye color, and supported head overlays.
- Uses player-derived head-blend data with companion-specific adjustments and fallback appearance pools.
- Compatible weapon flashlights are enabled automatically at night.
FEATURE 08
Multiplayer Synchronization and Player Protection
- Networked companion appearance data is shared with other clients and replayed when requested by joining or restarting clients.
- All player characters are excluded from companion hostile target selection, including manual aim targeting.
- Police, security, backup, and companion relationship groups are excluded from hostile target selection.
- Every client continuously applies player-safety rules to every companion on the server, so protection holds even when network ownership changes.
- Player protection is scoped to companions; the resource does not rewrite relationships between the game's standard player, police, and security groups.
- Cleanup handles dismissal, player death, ped changes, owner disconnects, resource shutdown, and patrol props.
FEATURE 09
In-Game Command Guide and Notifications
- A dedicated interface shows command descriptions, categories, and usage guidance.
- Search commands and browse them by purpose.
- Configured command names appear automatically in the guide.
- View companion count, squad mode, and weapon-kit information.
- Built-in on-screen notifications provide command feedback. The current interface and notifications are in English.
FEATURE 10
Lightweight Squad Engine
- A single scheduler drives the entire squad: combat, movement, vehicles, weapons, and patrol upkeep run in one coordinated loop.
- Orders are issued only when a companion's activity changes, not on a timer, so companions move and fight smoothly.
- The resource idles when you have no companions and none are nearby, and the torch light only runs while a torch is out.
Make it fit your server
- Standalone operation: standalone mode is the default.
- Framework job checks: ESX and QBCore allowed-job lists are provided for setups that initialize the corresponding framework object.
- Editable configuration: adjust command names, deployment settings, companion armor and combat attributes, detection and engagement rules, always-hostile relationship groups, appearance pools, torch settings, weapon lists, components, excluded weapons, unlimited ammo, weapon-follow delay, and fallback weapon through
config/config.lua. - Weapon catalog:
config/weapon_catalog.lualists add-on weapon and attachment names; add new weapon packs there to have their attachments copied. - Performance tuning: configurable scan limits, update intervals, boarding timeout, and safety-check timing.
- Saved formations: individual layouts and shared presets are stored by the resource for reuse.
- Custom assets: EUP clothing, add-on peds, and add-on weapons must be installed separately and be compatible with the companion models and weapon behavior.
GET STARTED
Installation
- Download and extract the MFPD-PoliceCompanion resource.
- Place the complete folder in your server's
resourcesdirectory. - Add the following line to your
server.cfg:ensure MFPD-PoliceCompanion - Adjust
config/config.luafor your server, then start the resource. - Use
/helpcompto review the controls and/formationto save your preferred squad layout.
MFPD-PoliceCompanion
Bring your squad along for the next patrol.


