FREE Ai Police Response

FREE!

Description

Ai Police Response is a free mod that enables wanted levels and sends AI police after wanted players. Each player draws a separate set of units. If two wanted players share a car, twice as many police respond. With four wanted people riding together, the vehicle draws four times the usual response. The author may revisit how difficulty scales with the number of wanted occupants.

What joins a pursuit

A police helicopter responds at higher star levels. The default brings it out at 4 stars, one star later than the base game’s 3. You can choose the level for that response. If the player is aboard a plane or helicopter, military aircraft can spawn too, including both planes and helicopters.

Which units players encounter also depends on the zone. You can assign units by zone and change the ped models for any unit. The default zones follow jurisdictions, also called regions. They cover Sandy Shores, Countryside, Paleto Bay and Los Santos.

  • For a unit to appear, the player must reach its minimum wanted level. Its spawnChance weight controls the odds that it spawns. The defaults give riot and fbi vehicles much greater weight. At the required levels they turn up far more frequently, though ordinary units can still answer the call.
  • Each unit that spawns can have custom loadouts. The mod picks a loadout at random, with a spawnChance weight determining the likelihood of each choice.

What other players see

Players can watch someone else’s pursuit because clients see the same police units. The server creates the units and sends their networkIDs to the client that asked for a response. That client maintains and controls them. Control should stay there without migrating to another client. A high distance culling setting allows control to continue even at long range.

A player can steal a police vehicle during a pursuit. Cleanup can run when peds die, when peds are distant or when wanted stars clear. If a player is in the stolen vehicle at that point, the vehicle stays and will never despawn. The author plans to remove it in a future version once the player abandons it for a certain time or distance.

Setting the size and difficulty of a chase

The mod replaces GTA V’s standard dispatch with a response described as more realistic and less punishing. It offers extensive configuration, including difficulty above or below the base game. Detailed comments throughout both the code and configuration explain how to make changes.

For each wanted level, you can choose how long evasion takes and how many units to send. Set counts separately for helicopters, ground units and planes (called air units). Each category also has its own spawn distance setting.

Dead units clear after a delay so more police can spawn. Units that are far away also clear after a delay for the same reason. For each category you can set both timers, one for dead units and one for distant ones.

Staffing and QBCore requirements

The mod was built for friends running a small RP server who could field few player officers. You can reserve AI dispatch for times when player police are offline. Set how many player officers are required and choose whether only those marked onDuty count. You can also protect players in police jobs from receiving wanted stars and restrict that protection to time spent on duty.

QBCore is required. It handles notifications and counts online players holding Police jobs. The mod checks for nearby vehicles through QBCore because the native check caused problems. QBCore also supplies the isDying or inLastStand check used to clear a player’s wanted level. In theory, removing notifications and last stand logic and restoring the native nearby vehicle check could allow the mod to run without QBCore.

Available export calls

exports['fenix-police']:ApplyWantedLevel(wantedLevelHere) -- wanted level can be 1 to 5, this ADDS the wantedLevelHere value to the existing wanted level!
exports['fenix-police']:SetWantedLevel(wantedLevelHere) -- wanted level can be 1 to 5, this SETS the players wanted level to the wantedLevelHere value if it is higher than the current wanted level.