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.

How to dismiss nearest cop?

Featured Replies

Ideally I'd like to have a way to auto dismiss all the cops, but until I re-write my code I was hoping for a temporary way to just dismiss the nearest cop to me.

My plugin currently will spawn a cop to drive to your location and he will stand there with the door open forever.

I do this mainly for backup and traffic control purposes.

What's a code I can use to get and then dismiss the nearest cop to me, and have him get in the nearest police vehicle to him, and drive away?

1 hour ago, download500 said:

My plugin currently will spawn a cop to drive to your location and he will stand there with the door open forever.

 

 

That means you spawned the cop yourself, so you should be able to do it this way.

If not, you can use Game.LocalPlayer.Character.GetNearbyPeds(), loop over the array until ped.RelationShipGroup=="COP" and then take control over that cop.

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.

2 hours ago, download500 said:

That single snip of code dismisses the nearest cop?  Or just a ped object that I've explicitly named cop? 

A ped object named cop. But you can loop through all of the nearby peds who are cops, just like Albo posted above.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

I created a plugin that has various cleanup options, useful for when LSPDFR crashes mid-pursuit or if a callout is a bit buggy resulting in some peds just standing around forever. It can do the following: 

  • Dismiss all peds in game
  • Dismiss all vehicles in game
  • Remove all blips from map
  • Delete all vehicles (option to delete only police vehicles and/or only occupied vehicles)

It works fairly well, although for some reason the "remove all blips" needs to be re-run a few times to clear all the blips, so I'm still working on fixing that before I upload the plugin.

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

6 minutes ago, PNWParksFan said:

I created a plugin that has various cleanup options, useful for when LSPDFR crashes mid-pursuit or if a callout is a bit buggy resulting in some peds just standing around forever. It can do the following: 

  • Dismiss all peds in game
  • Dismiss all vehicles in game
  • Remove all blips from map
  • Delete all vehicles (option to delete only police vehicles and/or only occupied vehicles)

It works fairly well, although for some reason the "remove all blips" needs to be re-run a few times to clear all the blips, so I'm still working on fixing that before I upload the plugin.

This! This! This! Yes please! :D The last days i often have the problem that sometimes arrested peds in the cells at mission row stay on the map as a fat red dot/blip. Then after a couple of minutes this big fat red blip starts to jump every few seconds over the map. It is not harming the game at all but for me it is irretating and annoying as ****. I try to ignore it but then i mostly end up with a game restart.

32 minutes ago, PNWParksFan said:

I created a plugin that has various cleanup options, useful for when LSPDFR crashes mid-pursuit or if a callout is a bit buggy resulting in some peds just standing around forever. It can do the following: 

  • Dismiss all peds in game
  • Dismiss all vehicles in game
  • Remove all blips from map
  • Delete all vehicles (option to delete only police vehicles and/or only occupied vehicles)

It works fairly well, although for some reason the "remove all blips" needs to be re-run a few times to clear all the blips, so I'm still working on fixing that before I upload the plugin.

I suppose you didn't know about the CleanWorld console command from RPH(CleanWorld true true true true true true), all the trues all options(remove living peds, remove dead peds, remove living vehicles, remove dead vehicles. remove persistant entities and reload world). The command doesn't remove blips though.

1 hour ago, alexguirre said:

I suppose you didn't know about the CleanWorld console command from RPH(CleanWorld true true true true true true), all the trues all options(remove living peds, remove dead peds, remove living vehicles, remove dead vehicles. remove persistant entities and reload world). The command doesn't remove blips though.

Yeah I'm aware of that function but I wanted more flexibility - the ability to dismiss peds/vehicles, and the ability to only delete police vehicles, and the ability to clear blips. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

3 hours ago, alexguirre said:

I suppose you didn't know about the CleanWorld console command from RPH(CleanWorld true true true true true true), all the trues all options(remove living peds, remove dead peds, remove living vehicles, remove dead vehicles. remove persistant entities and reload world). The command doesn't remove blips though.

I guess we all learn something new every day. Thanks for this :thumbsup:

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.

 

 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

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.