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.

download500

Members
  • Joined

  • Last visited

Everything posted by download500

  1. Well I'd like to be able to see other suspects if multiple fled in different directions, but if you think keeping the individual blip off will work then I will do it. If I dispatch a unit to the fleeing peds location (unknown to me but known to the game) will other units pursue it if they see him running since he is flagged as in pursuit? Or only if I order them to?
  2. Unlike other callouts I don't even want the search radius. For maximum realism I literally want to have to search for him totally on my own. Would I just add the ped to a pursuit but not attach a blip, and then only have the blip appear when I got within 50 feet of him? would that work?
  3. So depending on which option I choose, I could have any one of 8 cop ped objects dispatch to my location. Regardless of which one I call, I want them to all have the same trigger once they get within a certain distance of me. So basically I want to do something like if Game.LocalPlayer.Character.Position.DistanceTo(((any one of my spawned cop peds).Position) <= 20.0F) { (That cops vehicle).IsSirenSilent = true; } I know I could do 8 different If/Then statements with one for each cop, but I figured there was an easier way. How could I make this work?
  4. That single snip of code dismisses the nearest cop? Or just a ped object that I've explicitly named cop?
  5. Thanks, hopefully I can tackle that this weekend. How would I go about setting a radius around the cop once he arrives to where traffic cannot pass? Basically I have noticed when I post him up in a road, cars still drive around him. How can I set a radius around him that will be impassable to all but emergency vehicles?
  6. 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?
  7. It's actually pretty complex, I have completed it to do everything except dismiss properly. All working so far. I have: Code 2 travel with code 3 silent once they get within 50 feet of the stop point. Far more realistic as in real life, cops typically travel without lights and siren (but at an aggressive pace) and then flip the lights on silently as they approach their destination. Code 3 travel, with sirens going silent with 100f of destination Code 2 stealth (WIP) Cops will go silent sirens until about 100f out, and then cut emergency lights AND headlights off (if possible, havent figured this out yet) to do a stealth roll up, great for night time. You can currently dispatch local units (county or city) in any of those methods (except the stealth) You can also dispatch CHP or a detective (all with applicable uniformed peds) as code 2 with code 3 arrival within 50f. As of now, you just stand where you want them and it saves that position for their arrival. All units spawn from a random distance away, anywhere from 500f to 3000f. They have no blip, though they do call out over the radio when they depart and when they arrive. They currently just open their car door and stand behind it. I mainly made this as when roads are blocked off in real life, cops will typically post up in the roadblock position and direct traffic, which is a lot more realistic than simply stopping traffic. Also they can have their task be switched from just standing to "aim gun at" if you want to convert them to a felony traffic stop. If I can figure out how to dismiss them all and turn off their headlights I will be golden. You would have to maintain a list of cop peds (or ped handles would work, for memory management) that you spawn. An array, or preferably a Generic List, would work. I'm way more familiar in VB NET (my only experience with C# is what I have done for LSPDFR), but I can figure it out using a code converter. I am assuming I'd generate a new ped object for each dispatch, and then have it add the newly created object to a list of peds, to where during the delete sequence I could just do a "for each ped in list, if exists delete" ?
  8. Thanks. Suppose I spawn multiple instances of this, using the same ped "cop1" I could end up with 5 cops on the scene that were call called "cop1" because I pressed the button 5 times. How do I dismiss ALL of them, even if they were a previous instance? would if (cop1.Exists()) cop1.Delete(); work? or no, because the previous associatons lost their attachment to the name cop1? And if that is not possible, how would I delete the nearest vehicle to me?
  9. Got it thanks. Also, how do I have it determine whether I am in the city or county? For example if I am in the city I want it to spawn one car, but the county another, etc.
  10. You put it under: public class Main : Plugin { I'm getting "An object reference is required for the non-static field" when I put it there. I have it like this, is it incorrect? public class Main : Plugin { /// <summary> /// Constructor for the main class, same as the class, do not rename. /// </summary> /// variables below? /// private Ped cop1; private Vehicle v1; private Blip b1; private Random rand1 = new Random(); private int r; private int v; private int unit = 1;
  11. I'm using the following code, but for some reason it spawns the cop instantly on top of me, versus having him spawn 1000f feet out and drive to me. What am I doing wrong? Game.DisplaySubtitle("David 1 en route", 5000); cop1 = new Ped("S_M_Y_Sheriff_01", Game.LocalPlayer.Character.Position, 1000f); v1 = new Vehicle("SHERIFF", cop1.Position, 5f); cop1.WarpIntoVehicle(v1, -1); v1.IsSirenOn = true; v1.IsSirenSilent = true; b1 = cop1.AttachBlip(); b1.Order = 100; //b1.Color = Color.Yellow; cop1.Tasks.DriveToPosition(Game.LocalPlayer.Character.Position, 35, VehicleDrivingFlags.Emergency, 30f).WaitForCompletion(); cop1.Tasks.LeaveVehicle(LeaveVehicleFlags.LeaveDoorOpen); Game.DisplaySubtitle("David 1 arrival", 5000); UPDATE: Got it working! Had to use cop1 = new Ped("S_M_Y_Sheriff_01", World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(250)), 1000f);
  12. Where do I declare my variables like private vehicle v1; ? I tried doing it under main, and my script says the variable is not declared. I ended up putting it just under the game.iskeydown as: ped cop1; vehicle v1; will see if that works
  13. Awesome thanks I will check it out. Can I make as many instances of if (Game.IsKeyDown(Keys.F1)) //Change F1 to whatever key you want.... { //Code to be executed upon keypress goes here...... } GameFiber.Yield(); within Functions_OnOnDutyStateChanged(bool onDuty) as I want, i.e. one for each hotkey I make? Or should I be putting them in separate .cs sheets?
  14. I have experience in that I've successfully made a normal callout with the ability to press a button at any time and an event occurs. Basically I want to spawn a cop and a cop car 3000f away from my active location, and have him drive to me, and then get out once he arrives and hold position. I know how to script this as I have done it in my callout, but the problem is this type of backup (a permanent cop acting as a sentry) is only available when my callout occurs. I would like to always be available. so yes if you have an example project that's a template for a plugin, where I could paste in code that would be activated any time the button "Y" (or whatever button I choose) is pressed, that would be awesome
  15. You know how if you put something in base.process on a callout it will check every tick to see if a button is down, and if it is, runs an action? What do I need to do or edit so that I can edit the base.process of Rage, that is, make a button (or random event) that is checked for every tick? I wanted to make a custom backup script and this would be useful. If someone has a clean template (similar to the API callout example) that I could just paste my script into that would be AWESOME!
  16. Thanks! headed to bed in a minute but I will try this out tomorrow.
  17. Question about that as well. When I have slept the fiber it seems to pause the whole system until sleep is complete. Can I have unlimited sleeps (that wont affect other processes, if I use GameFiber.StartNew(delegate { GameFiber.Sleep(5000); ? If so, can I make it GameFiber.StarNew(Delegate each time, or do I have to call it something different every time?
  18. I'm trying to do Persona pedPersona = API.Functions.GetPersonaForPed(Game.LocalPlayer.Character, null); but I get a squiggly on the API portion. Do I have the wrong reference added or is this obsolete as of the new Rage?
  19. I'm having some issues with some of my random numbers always being the same. I did some digging and realized that it's an issue in C# when you have too many NEW randoms close together because they use the same seed. I have currently been using this: int cophelps = new Random.Next(1, 3); int suspectAttacks = new Random.Next(1,9); however I am assuming I need to switch to: int cophelps = myRand.Next(1, 3); int suspectAttacks = MyRand.Next(1, 9); with private Random myRand; up top with the peds/vehicles etc at first time declaration. Is that correct?
  20. HAHAHAAH OH MY GOD I was about to post about that exact issue because it was crashing my plugin, you just saved the day man. Where can I find this changelog that I assume I am the only one that didn't read, in regards to what stuff is broken in the new rage?
  21. How exactly do you make a plugin? Is there an API example of a plugin (similar to the one available for callouts) that loads when you go on duty, that constantly checks for button pushes so that I could write a script that toggles based on a button push?
  22. The problem with that though is I need them to be on the scene behaving calmly, not with guns drawn, and I want them to stay there until I tell them to go away. With the backup function, the only way to get them with a siren is to call them code 3, which has them go guns drawn, and they don't stay long. Is there a function that will let me reference the nearest cop, or all cops within a range as a PED so that I can give them tasks/make them stand indefinitely?
  23. I'm creating a mod that will allow you to pre-dispatch backup to a location before you arrive in case a responding unit can get there first. I also am creating the ability to dispatch units to points as nothing more than traffic control and have them stand by until you dismiss them. I understand how to spawn them at the location, but how do I spawn them a distance out and make them drive to it? This is my current code: if (Game.LocalPlayer.Character.Position.DistanceTo(myPed.Position) > 50.0F && Game.LocalPlayer.Character.Position.DistanceTo(caller.Position) > 50.0F) { int cophelps = new Random().Next(1, 5); if (cophelps == 1) { int copFindsFirst = new Random().Next(1, 2); if (copFindsFirst == 2) { Game.DisplaySubtitle("Other Unit: I've located the subject, I'm in pursuit.", 5000); Functions.AddPedToPursuit(this.pursuit, this.myPed); Functions.RequestBackup(myPed.Position.Around(5f), LSPD_First_Response.EBackupResponseType.Code3, LSPD_First_Response.EBackupUnitType.LocalUnit); cop1 = new Ped("S_M_Y_Sheriff_01", myPed.Position, 1f); copcar1 = new Vehicle("SHERIFF", myPed.Position, 5f); copcar1.IsSirenOn = true; } else { Game.DisplaySubtitle("Other Unit: I'm out with the caller.", 5000); cop1 = new Ped("S_M_Y_Sheriff_01", caller.Position, 1f); copcar1 = new Vehicle("SHERIFF", caller.Position, 5f); copcar1.IsSirenOn = true; } } } }

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.