Enable / disable SetPoliceIgnorePlayer

I’m doing a script to improve the AI of the NPCs Police
sometimes when active SetPoliceIgnorePlayer the cops keep firing
Does anyone know why?
Is there any other way for the cop not to shoot the player?

hard to tell without the code

Set entity relationships. But ignore should work, show the code your using so you can be better helped…

my code

if (IsControlJustPressed(1, Keys[“8”])) then
SetPoliceIgnorePlayer(GetPlayerIndex(),false)
end
if (IsControlJustPressed(1, Keys[“9”])) then
SetPoliceIgnorePlayer(GetPlayerIndex(),true)
end

1 Like

found the problem, it is the helicopters that are firing

another question that has nothing related to the topic, wanted to know the name of the animation of the paramedic NPCs when they are “reviving” the dead NPCs

medic_time_od_death

something like that

view the below

https://alexguirre.github.io/animations-list/

Do you guys know if there is a way to improve the ways the AI cops are acting, and not shooting at 1 star. Trying to arrest you first. I know that you wanted to create a script to command them also

Is it possible to adapt the following script to FiveM ?

https://www.gta.cz/eng/gta5/download/gta-5-better-chases-arrest-warrant