Jump to content

Making a ped immune to pullover


khorio

Recommended Posts

7 minutes ago, khorio said:

Is there a way to make a ped ignore police warnings, making them immune to traffic stops? Couldn't find anything in the API.

 

do you want them to instead flee from you and make a pursuit? is that what you want as if that is what you want you might have worded it wrong.

Edited by timnboys

My plugins by me are on this site in addition to my own site as well.

Do Not PM Me for Support! follow the instructions for getting support with any mods. 

Link to comment
Share on other sites

No,  in one case I need to prevent them from reacting to a pullover (blipping them and turning on the siren), in the other call I need them to react to a pullover(stop) and prevent them from creating a pursuit(fleeing). So  it's more like 2 questions :)

 

Edited by khorio
Link to comment
Share on other sites

This worked for me to block a ped from being stopped on foot by the player, in theory I suspect it'd work for traffic stops too but I haven't tested that personally:

Functions.SetPedCantBeArrestedByPlayer(Ped, bool);

 

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

Link to comment
Share on other sites

29 minutes ago, Darkmyre said:

This worked for me to block a ped from being stopped on foot by the player, in theory I suspect it'd work for traffic stops too but I haven't tested that personally:

Functions.SetPedCantBeArrestedByPlayer(Ped, bool);

 

Nope, looks like it doesn't, they still pull over, ive tried ending the pullover in the code but he still has to pull over and come to a stop before its cancelled

 

Link to comment
Share on other sites

On 5/28/2016 at 1:08 PM, khorio said:

Nope, looks like it doesn't, they still pull over, ive tried ending the pullover in the code but he still has to pull over and come to a stop before its cancelled

 

Try this:

LHandle pullover = Functions.GetCurrentPullover();

if (pullover != null)
{
	if (Functions.GetPulloverSuspect(pullover) == immune_ped)
	{
		Functions.ForceEndCurrentPullover();
	}
}

 

Link to comment
Share on other sites

4 hours ago, khorio said:

He still stops the car just to move on again, after a couple of times this turns it into a pursuit and the whole callout is wasted :p

 

In that case, do some experimenting yourself :smile:

You may need to loop the above code and clear their tasks, for instance.

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...