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.

Stealth22

Friends of LSPDFR
  • Joined

  • Last visited

Everything posted by Stealth22

  1. EDIT: Sigh...as it goes in IT...it was a user problem! /facepalm (I had a bug in my code that triggered an infinite loop. Doh!)
  2. Sam, when playing scanner audio, does the WAV file have to be in the LSPDFR\Police Scanner folder? Or does the API have access to the entire scanner audio library within GTA V?
  3. So I've got one callout mostly done, and I'm just ironing out the dispatch audio. Once that's done, I'll be working on adding more callouts! After some testing, we should see a prototype release in the near future!!
  4. Good stuff, man! Can't wait to see it! If you need anything, send me a PM, or post in the API forum!
  5. Most of your police callouts are being done, either by me or other developers. I'm particularly interested in the police imposter one. I think I'll add that to my list
  6. Quick update, guys... I was fiddling around with it earlier today, and it looks promising. The lag seems to be gone, but I want to test it some more, just to be sure. Hope to have an update for you all soon!
  7. The player will never know that the callout has been aborted. Check out the OnBeforeCalloutDisplayed() function, which returns a Boolean data type. If you return False from this function, the callout will never make it to the user.
  8. I forget what its called, but there is a function to get the "zone" for your location. You can use that, and then abort the callout if its not in the area you want.
  9. So being that I am a software developer for a living, I thought I would create this thread to share some tips with fellow developers...especially those who are new. Anyone can contribute to this topic...I myself am a newbie when it comes to RAGE Plugin Hook and LSPDFR. So anything useful that you come across, feel free to post it! Some of what I have written below may not make sense to a new programmer, so if you have questions, or it seems like I am speaking Martian, feel free to ask questions!! I'll start off by saying... ORGANIZE YOUR CODE!! This means folders and namespaces for just about everything. Don't keep all your classes at the root level, and do not, for god's sake, do every part of your code in the Main class. Feel free to ask questions about this if you are confused, but LukeD's example API is a great way to start with namespaces. Take advantage of inheritance and polymorphism! Use base classes and interfaces for everything! (Callouts, pedestrians, vehicles, etc) For example, I have started on the framework for my callout plugin. I have a CalloutBase class, which inherits the LSPDFR Callout class, and it has all of my method overrides. The overridden methods in CalloutBase perform any actions which are common to all of my callouts. Each callout type will have its own class, which would, you guessed it: inherit the CalloutBase class. My CalloutBase class implements my "ICalloutBase" interface. The interface is for declaring methods or properties that CalloutBase may not be able to do anything with, but if you use the abstract keyword in C# (or MustOverride in VB.NET), then each callout class/type you create would have it's own set of actions for that function. For example, my ICalloutBase interface declares a method called "OnArrivalAtScene()". The CalloutBase class implements this as an abstract method, meaning, any class that inherits CalloutBase (say, ShotsFiredCall, for example) has to have a method called "OnArrivalAtScene", which would be a set of actions for the program to take when the officer arrives on scene OF THE SHOTS FIRED CALL ONLY. The abstract method I just created would be called in the Process() method of the CalloutBase class. Remember, Process() is an LSPDFR method that is called continuously. CalloutBase performs actions which are common to ALL callouts, including calling the OnArrivalAtScene() method. In CalloutBase.Process(), I check to see if the player's location is getting close to my callout location. If so, and if the callout state is still "Unit Responding", then OnArrivalAtScene() is called, and the state is changed to "At Scene". Now, when you create a ShotsFiredCall class, there is no need to call OnArrivalAtScene() from ShotsFiredCall.Process(), because CalloutBase.Process() has already done it for you! The example I stated above requires you to track the state of the callout (i.e. Dispatched, Unit Responding, At Scene, Call Completed, Call Cancelled, etc), but it just gives you an idea on how efficient you can make your code. Its a bit of legwork in the beginning, but it pays off BIG TIME as your plugin grows and matures. Using base classes and interfaces is not only useful for Callout classes. You can use them to track which Peds are suspects, and which are civilians, or what role a certain vehicle plays in your callout. You can add properties to Peds that don't exist in the Rage Plugin, like "MyPlugin.MySuspect.IsBankRobber", for a simple example. ERROR HANDLING!! Always, always, ALWAYS use proper error handling. One bad block of code can crash a user's entire game. Use Try...Catch blocks, and use the Catch block to log exceptions, so that when a user says "Your plugin is shit!!", then their log file will tell you what is wrong. Always use Ped.Exists or Vehicle.Exists (I think its called Exists for cars) to make sure that GTA V has not disposed of your object. GTA V does not mess around in terms of garbage collection and memory management. Always check if an object is null, and then if it has an Exists property, check that as well. ANYONE CAN CODE!! VB.NET and C# are both very easy to learn. It does take years to master programming, and a university education in Computer Science or Software Engineering definitely helps. But if you're a newbie, and want to learn, jump in with both feet! Search Google for tutorials, or buy a book at your local book store. I guarantee that you can write a Hello World! program in less than 5 minutes! VISUAL STUDIO IS FREE!! That's right! Visual Studio Community Edition 2013 is completely free. It doesn't have all the features that the pros use, but who cares? You aren't a software company! USE A CODE REPO AND SOURCE CONTROL!! When you download Visual Studio Community, you get the option of creating a Visual Studio Online account. DO IT! Visual Studio Online gives you free and unlimited access to code repositories where you can store and back up your code. If any programmers are reading this, they provide both TFS and Git based repos. Source Control allows you to keep track of each change you make to your code. Last update crashed everyone's GTA? No problem, just roll back your changes! Computer hard drive crash? Laptop stolen? No problem! Once you're up and running, install Visual Studio again, connect to your code repo, and all your code is back! For those that use TFS, you can create work items for yourself to track all changes that you need to make to your plugin. Each time you check in code, you can tie a set of changes (called a changeset) to a specific work item. BRANCH YOUR CODE!! This, at an elementary level, means to maintain two copies of your code. Your main branch (also referred to as your 'master' or 'trunk' branch) contains the most stable version of your code. Your second branch is called your 'dev', or development branch. All of your code changes and testing should be made on the dev branch. When you're ready to release, you merge all of the relevant changes from your dev branch to the trunk. This allows you to make different code changes to your project, all in parallel. This allowed me to recently release a LSPDFR 0.3 compatibility patch for Code 3 Callouts (I made those code changes in my trunk branch), while still working on the next update in my dev branch. See this MSDN link for more details: https://msdn.microsoft.com/en-us/library/ee782536.aspx CHECK ALL DEPENDENCIES ON STARTUP!! Check file versions on EVERY DLL or assembly referenced by your project. You don't need to check the Microsoft .NET ones, but you should be checking file versions on RagePluginHook.exe, the LSPDFR DLL, and any other DLL (including RageNative UI, a Common DLL you've written yourself, etc) that is used by your project and needs to be installed in the GTA V folder. And NO, do NOT, I repeat, NOT use the Assembly class to load the DLL's into memory. That is just a waste of resources. Use the GetVersionInfo function of the System.Diagnostics.FileVersionInfo class instead. More to come...
  10. I don't see that property in the Object Browser, but when I tried that, I get this: 'IsShowing' is ambiguous because multiple kinds of members with this name exist in class 'LSPD_First_Response.PoliceComputer'.
  11. I second that motion. (Pretty please?)
  12. ** Starts up Visual Studio, laughing evilly**
  13. Depends where you live, I suppose. But I've been on 3 ridealongs with my local police. They are CONTINUOUSLY checking plates on the laptop while driving. They are encouraged to pull over when they need to use their department cell phones, but it is not required. Distracted driving laws, in most jurisdictions, do not apply to police officers. In fact, a police officer, when performing his/her duties, can break any traffic law that they need to, with or without the sirens. I would like this feature. However, that being said, as Sam said, it isn't possible. I would much prefer a police computer that did not interfere with the controls for the rest of the game. That was a very frustrating part of the police computer in LCPDFR. If you want to run the plate of a moving vehicle, its best to follow them and wait for a chance to stop. Over 80% of the time, they will come to a red light or stop sign, and you can do it then. OR, if FinKone is able to update his Police Radio to talk to the LSPDFR API (I think he was planning to, but I'm not sure, so don't quote me on that), then that's another way for us to run plates.
  14. Code 3 Callouts "Attention all units, officer needs assistance. Shots fired. All available units, respond Code 3." This is a plugin that I have been planning for ever since I started writing scripts for LSPDFR. Now that the LSPDFR API has come out, this idea can now become a reality! The focus of this plugin will be to create a realistic experience where the player needs to do some actual police work. Police work is not always about flicking on the lights and sirens and flying down the road at 100 MPH. Nor is it always about pulling out an AR-15 and emptying a clip on a suspect. In fact, most of the time, police work is all about dealing with people. Hearing both sides of the story. Figure out who is lying, and who isn't. Sometimes you have a helping hand when you have an eyewitness, and sometimes not. Or sometimes you will get eyewitnesses who contradict one another. Bob says the bank robber's car was blue. Jane says the car was red. Turns out, Jane was on her cell phone, and wasn't paying attention. Oh, and Bob was in the bathroom, so he didn't actually see anything. You later find out that the car was actually green. It is YOUR job to determine what actually happened based on the evidence. Its time for your shift, Officer. Gear up, and move out. Callouts Assault Intoxicated Person Person with a Gun Unknown Trouble Hit and Run Impaired Driver Police Impersonator Road Rage in Progress Backup Required (Domestic Disturbance) Callouts Coming Soon Burglary in progress (Next update!!) Future Callouts Citizen reporting officer in danger Suspicious vehicle, with occupant(s) inside Domestic disturbance (May remove this, depending on how the above domestic backup call plays out) Bank robbery Officer requesting backup (potentially with one of the above calls!) Kidnapping in progress Shots fired ...and more!! (Not all of these callouts may be implemented. Plans are subject to change.) Features Framework & logic for managing each callout type Dispatch audio Altering suspect behavior based on the response of the officer Ambient events! ...more to come!! Screenshots The following screenshots are from the Assault callout. You need to get stories from the victim and the suspect! Figure out who is lying by speaking to the witness! Check everyone's ID's, just so you know who you are talking to, and so you can run their names in your computer! Videos FinKone has done a video demonstrating an early version of Code 3 Callouts, and watch for a video (coming soon!) by Jeff Favignano as well! Developer Information This plugin will be designed to work alongside callout plugins created by other developers. I am already in conversation with LukeD (Callouts V), FinKone, and Straysify, and best efforts will be made by all of us not to step on each other's toes. Any other developers that will be producing callout plugins are encouraged to keep in touch with all other callout developers to ensure that we don't unnecessarily duplicate any work.
  15. I wish it was that easy, man. Unfortunately its an all or nothing sort of deal at the moment. For now there is a workaround...once I get Keep Calm stable, I may have another look at it.
  16. I tried this last night. It didn't work for me. I do not have Script Hook .NET installed.
  17. Folks, the freezing/stuttering is an ongoing issue. I thought I had fixed it, so I had released a new build, version 0.0.3, earlier today. Turned out that version had another separate issue, so I removed it, and reverted this page back to version 0.0.2. So there was no "update" today. I'm hoping to have a new update soon.
  18. I'll have to try testing it again, but I never saw that when I tried it. Can you tell me... - Your computer specs? - What other mods you have installed? - What version of GTA are you running? - What version of RAGE Plugin Hook do you have installed?
  19. That's strange, I never saw that. Then again, my GTA hasn't been in the best condition, as I mentioned. I will be looking at it again regardless, but if this happens with anyone else, I'll be pulling v0.0.3 down. EDIT: Never mind, I've decided to just remove it anyway. It will go through further testing before being re-released.
  20. Just uploaded a new version! EDIT: Update has been removed due to an unforseen bug.
  21. Uploaded a new version...hopefully this fixes it. I've been having issues with my copy of GTA V ever since it forced me to re-activate and update to v393. But I think I have got it nailed down. I've decided to release it for public feedback...it is a beta after all, haha. Let me know if there are any issues!
  22. I would have thought that dinput8.dll would be critical to Script Hook V...what Script Hook mods do you have installed? Do they still work? Personally, I use 'Player Location Display' and the Simple Trainer. Both draw their own menus/text on the screen, which would require a DirectX hook...which dinput8.dll seems to be, at least judging from the file name. I suppose I could try it, but my gut says that removing that DLL would kill the two mods I mentioned.
  23. I have been digging into this issue between last night and this morning. There is some (unconfirmed) rumors which say that it is happening because of some versions of DXGI.DLL being incompatible. I don't know if this is true or not, because v1.0.372.2 (not v1.0.372.2a) of the Script Hook was working fine on my computer. Any version after that (372.2a or 393.2) freezes up the RAGE console. Something changed in between that broke it, for me at least. But anyway, this looks like its an issue with Script Hook V, and it has been brought up in the Script Hook V thread on GTAForums. Here is what Alexander Blade (the developer of Script Hook V) had to say about the issue, when another user asked about it: http://gtaforums.com/topic/788343-script-hook-v/?p=1067740326 That message from Alexander was posted yesterday. So he is indeed working on it. Let's hope that he comes up with a solution soon. Unfortunately, I have not been able to find a trainer that does not require Script Hook V. The only two Script Hook mods I use are the Player Location Display (made by Lt.Caine I believe?), and the Simple Trainer. The PLD I can do without, but the trainer is kind of essential. At this point, the workaround is to load all your plugins in the startup.rphs file, and not use the RAGE console at all. It does work if you press F4 and then type your command blindly, but you have to get it exactly right. I was also not able to use FinKone's Police Radio while playing last night, so I suspect its because of the same issue. Gah. Everything was working FINE on build 372 of GTA. I wish Rockstar's activation mechanism didn't force you to update. I didn't take a full backup of my GTA V folder (65GB!), but I grabbed the EXE files, as well as the update folder. I could probably roll back to 372 if I really messed around with it, but then in a couple of weeks, GTA is going to want to "phone home" and re-activate again, which will re-trigger the stupid update. Sigh. #FirstWorldProblems
  24. I'm having the same problem, after GTA forced me to reactivate and update to v393. Everything was working fine under v372 for flips sake. I've got the latest rage plugin and latest script hook. They do NOT work together Maybe I am missing something. Does anyone have a solution? Is there a trainer built for rage hook?

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.