im working on a plugin that uses nearby cops (not spawned manually) to respond when an NPC starts shooting at the player.
Problem is: the cops enter combat for a few seconds, then stop on their own even though the attacker is still alive. I’ve already tried:
- SET_ENTITY_AS_MISSION_ENTITY so I can control them freely
- REMOVE_PED_FROM_GROUP
- Gave them weapons and used Tasks.FightAgainst(attacker)
- Set relationship between COP and Attacker to HATE
- Blocked permanent events, cleared tasks, all that stuff
But still, they only shoot for a bit then just stand there like nothing happened.
From what I read, LSPDFR overrides cop AI and only lets them return fire *if they’re being shot at*. But what I’m trying to figure out is:
1. Is there any way to keep cops in combat until the attacker is dead?
2. Can I override or disable LSPDFR's logic so the AI doesn’t get reset?
3. Do I really have to start a pursuit and add cops for them to actually stay aggressive?
4. Or is there some flag or trick to make them “allowed to fight” without LSPDFR interfering?
What I’m going for is: if a shooting happens near the player, cops nearby should react and help naturally, like a patrol would, without needing to spawn units or start a pursuit.