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.

Game crashed after starting a callout I created.

Featured Replies

I attached my RagePluginHook.log file below.

What happened was I created a pursuit in progress call for lspdfr and when I start it, the game lags and then it crashes. The error message I'm looking at is "System.NotImplementedException: The method or operation is not implemented." Any help would be greatly appreciated.

RagePluginHook.log

Hallel Shapiro

6 hours ago, Hallel said:

I attached my RagePluginHook.log file below.

What happened was I created a pursuit in progress call for lspdfr and when I start it, the game lags and then it crashes. The error message I'm looking at is "System.NotImplementedException: The method or operation is not implemented." Any help would be greatly appreciated.

RagePluginHook.log 455.52 kB · 3 downloads

Hard to tell without your code, but the lagging and eventually crashing makes me believe that you are constantly creating the chase in a loop.

Edited by RicyVasco

  • Author
1 hour ago, Mytical49 said:

Can you share the callout code, that's where everything is happening ?

The callout code is in there. It's in the "PursuitinProgress.cs"

Edited by Hallel

Hallel Shapiro

1 hour ago, Hallel said:

Do we know how to prevent it from looping?

Here's the code

https://srcshare.io/644d9b0a96a12d1b01ac6d10

Yeah you are calling it in a loop, creating the pursuit and requesting backup over and over again.

 

There are numerous ways on how to fix it. One solution would be to create a bool

 

public LHandle pursuit;
public Vector3 SpawnPoint;
public Blip myBlip;
public Ped mySuspect;
public Vehicle myVehicle;
public bool StartedChase;

 

And then in your process:

 

if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 100f && !StartedChase)
                {
                    // Create the pursuit.
                    this.pursuit = Functions.CreatePursuit();

                    // Add mySuspect to the pursuit.
                    Functions.AddPedToPursuit(this.pursuit, mySuspect);

                    // Request backup for an air unit and one local unit to join the pursuit.

                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.AirUnit);

                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, 		LSPD_First_Response.EBackupUnitType.LocalUnit);
			StartedChase = true;
                }

 

Also, make sure to end the callout somehow like checking if the Suspect is arrested or killed, otherwise your callout will run indefinitely.

  • Author
46 minutes ago, RicyVasco said:

Yeah you are calling it in a loop, creating the pursuit and requesting backup over and over again.

 

There are numerous ways on how to fix it. One solution would be to create a bool

 

public LHandle pursuit;
public Vector3 SpawnPoint;
public Blip myBlip;
public Ped mySuspect;
public Vehicle myVehicle;
public bool StartedChase;

 

And then in your process:

 

if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 100f && !StartedChase)
                {
                    // Create the pursuit.
                    this.pursuit = Functions.CreatePursuit();

                    // Add mySuspect to the pursuit.
                    Functions.AddPedToPursuit(this.pursuit, mySuspect);

                    // Request backup for an air unit and one local unit to join the pursuit.

                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.AirUnit);

                    Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, 		LSPD_First_Response.EBackupUnitType.LocalUnit);
			StartedChase = true;
                }

 

Also, make sure to end the callout somehow like checking if the Suspect is arrested or killed, otherwise your callout will run indefinitely.

Thank you so much! I appreciate it

48 minutes ago, Mytical49 said:

You're right, my bad

Thank you to you too!

Hallel Shapiro

  • Author

https://srcshare.io/644d9b0a96a12d1b01ac6d10

 

I edited the Process and the End methods. I'm 90% sure this is fine but I would like a second opinion.

 

I tried it out in game. When i go to the vehicle, there were vehicles going after it but there were no blips for anything except the vehicle and the vehicle was not moving. Idk if it's because I forgot something or I messed something up.

Edited by Hallel
Tested in game

Hallel Shapiro

2 hours ago, Hallel said:

there were no blips for anything except the vehicle and the vehicle was not moving

You need to add blips yourself, and you also need to move the car yourself, as in drive from vectorA to vectorB or use method cruising or something like reactAndFlee-method called on the vehicles driver.
Blip:
Blip marker = crimeCar.AttachBlip();//construct object
                                    marker.Color = Color.Bisque; //select a color
                                    marker.Scale = 1.0f;//select default size

Where crimeCar is an existing Vehicle

 

Move car:
crimeCar.Driver.Tasks.ReactAndFlee(Game.LocalPlayer.Character);
 

There are other Tasks possible so look at the options (VS- in Intellsence)

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
19 minutes ago, GTAbear said:

You need to add blips yourself, and you also need to move the car yourself, as in drive from vectorA to vectorB or use method cruising or something like reactAndFlee-method called on the vehicles driver.
Blip:
Blip marker = crimeCar.AttachBlip();//construct object
                                    marker.Color = Color.Bisque; //select a color
                                    marker.Scale = 1.0f;//select default size

Where crimeCar is an existing Vehicle

 

Move car:
crimeCar.Driver.Tasks.ReactAndFlee(Game.LocalPlayer.Character);
 

There are other Tasks possible so look at the options (VS- in Intellsence)

My bad. I meant there's no blip for the police backup. Do I need to create that on my own as well?

Hallel Shapiro

7 hours ago, Hallel said:

https://srcshare.io/644d9b0a96a12d1b01ac6d10

 

I edited the Process and the End methods. I'm 90% sure this is fine but I would like a second opinion.

 

I tried it out in game. When i go to the vehicle, there were vehicles going after it but there were no blips for anything except the vehicle and the vehicle was not moving. Idk if it's because I forgot something or I messed something up.

I don't see any changes in the link you pro ided but I'm also on my phone right now so maybe its a bit funky.

 

You also need to set the Chase active for the player.

 

4 hours ago, GTAbear said:

You need to add blips yourself, and you also need to move the car yourself, as in drive from vectorA to ...

While you can do that, it's not necessary. If you create a chase, add members and then set it active for the player, LSPDFR will handle ecerything. No need to give the suspect a flee task or give blips to backup

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

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.