Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Traffic Stop Start

Featured Replies

Hello!

 

So I want to change the way traffic stops are initiated. So I wonder what function in the API I should call to trigger the traffic stop? I've searched through the API reference but haven't been able to find it.

 

Thanks in advance 🙂

  • Author
6 hours ago, Matteov2.0 said:

Try to use



CloseRoadsAround.GetNearbyVehicles(value);

 

 

Does that initiate the traffic stop?

Edited by pettelord
_ instead of a ?

  • Author
1 hour ago, Matteov2.0 said:

Yes it close the nearby roads, so must stops traffic. Let me know if it works fine

 

Yeah but with traffic stops I mean when you pull someone over. Not like traffic control. I mean for example when you pull someone over for speeding.

  • Author
12 minutes ago, Matteov2.0 said:

Ok so use this:


vehicle = Functions.GetPulloverSuspect

 

 

Alright, so when pulling someone over, you first need to hit LShift (to mark the vehicle) then you need to activate your sirens (With ELS, you need to activate your primary lights) to actually signal the vehicle to stop. Do I use 

vehicle = Functions.GetPulloverSuspect

 

To mark the vehicle, or to signal the vehicle to stop?

  • Author
Just now, Matteov2.0 said:

Yes you must activate only the lights and press shift

Cause my whole idea is to have a new way to signal vehicles to pull over.

 

How I want it to be:

 

1. Pull upp behind a vehicle, press LShift. (Just like it is now)

2. Instead of hitting J (ELS Primary lights), you honk and the vehicle and your ELS Warning lights will light up.

  • Author
On 1/12/2021 at 5:27 PM, Matteov2.0 said:

Excuse me these days I have been busier but I have not forgotten your request. However, yes it is possible

 

No worries, I appreciate the help! So what API do I use for the action to pull over? Not the LShift command, but the "Activate your sirens to signal the vehicle to pullover" command.

I think you mean when I press the E button (you can change it to another one according to your preferences) then (you) pull the vehicle:

//I have set the key E, because in LSPDFR you set the lights off/on (if you have the dafaults settings)
if (Game.IsKeyDown(System.Windows.Forms.Keys.E))
	{			
		Functions.GetCurrentPullover();
	}

 

  • Author
2 hours ago, Matteov2.0 said:

I think you mean when I press the E button (you can change it to another one according to your preferences) then (you) pull the vehicle:


//I have set the key E, because in LSPDFR you set the lights off/on (if you have the dafaults settings)
if (Game.IsKeyDown(System.Windows.Forms.Keys.E))
	{			
		Functions.GetCurrentPullover();
	}

 

 

 

In LSPDFR Vanilla, when you hit LShift this shows:

unknown.png

 

Then after you have activated your siren it will stop:

unknown.png

 

But I want the vehicle to stop like this after I honk at it, not by using any emergency lights. So after I honk:

unknown.png

 

Can I achive that by using the code you said?

 

  • Author
2 hours ago, Matteov2.0 said:

Ah ok .. now I understand..


if (Game.IsKeyDown(System.Windows.Forms.Keys.E))
	{			
		Functions.CanPedBePulledOver(Ped ped);
	}

 

 

Okay so after I've pressed LShift to mark the vehicle, I get this unknown.png

 

Then this: 

if (Game.IsKeyDown(System.Windows.Forms.Keys.E))
	{			
		Functions.CanPedBePulledOver(Ped ped);
	}

 

Will give me unknown.png ?

On 1/11/2021 at 2:39 AM, pettelord said:

Cause my whole idea is to have a new way to signal vehicles to pull over.

 

How I want it to be:

 

1. Pull upp behind a vehicle, press LShift. (Just like it is now)

2. Instead of hitting J (ELS Primary lights), you honk and the vehicle and your ELS Warning lights will light up.

 

As far as I know, traffic stops can only be initiated at ELS stage 3.  If you want to be able to do it at stage 1 or 2, you have to edit each car's ELS file by changing the value of <DfltSirenLtsActivateAtLstg>3</DfltSirenLtsActivateAtLstg> to 2 or 1.  To make the car honk and turn its lights on to a specific ELS stage when you press the traffic stop key, I would recommend using a library that allows you to do simulate key presses.  I use InputManager.

 

I don't know if the StartPulloverOnParkedVehicle function will force a new traffic stop on a non-parked vehicle (I assume the name is specific for a reason).  The other pullover/traffic stop related functions Matt recommended will not.

 

Edited by Rich

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

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...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.