Jump to content
Cryotech

Development Documentation?

Recommended Posts

Hello all,

First off, I want to to give a huge thank you to all the developers and modders of this amazing script. Being a LEO myself, this is a great way to pass the time when I'm not on shift enforcing the law GTA V style for the most minor of infractions. Just kidding lol.

I also wanted to apologize in advance if my question has been asked before. I've been searching through this community and google for my answers but for whatever reason, can't find what I'm looking for.

I'm not new to programming and will be using C# to create my scripts. The biggest problem I'm having is locating the method / class documentation. Unless I'm just blind, I can't find where a few modders here are obtaining their methods and objects and what's already included in the APIExample file to include in any custom script I'm creating. For example:

 

Functions.CreatePursuit();

 

World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300f));
Functions.AddPedToPursuit()
AddMinimumDistanceCheck(5f, myPed.Position);

Etc., etc.

As I said, I might just be blind because I've searched and combed through what material I could find, including Rage Hook Docs and I can't seem to locate these particular methods as well as a few methods and classes not listed above.

What documentation (official and unofficial) are you all using to create your scripts? Where are you obtaining the necessary methods / classes / objects etc?

Share this post


Link to post
Share on other sites

All the stuff you listed above (except getnextpositiononstreet) is from the LSPDFR API. There's no official documentation yet. If you want to see the available functions from the LSPDFR API, do the following:

  1. Add it as a reference in your C# project.
  2. In your solution explorer (on the right in Visual Studio) expand the "References" section.
  3. Double click on LSPD FIrst Response.
  4. In the window that appears, expand LSPD First Response.
  5. Voila! The functions you should use are under Mod.API and Mod.Callouts.

Same can be done for RPH.

Enjoy!

Edited by Albo1125

Share this post


Link to post
Share on other sites

Thank you very much for your help Albo!

I wanted to let you know, your mods are amazing my friend. I currently have arrest manager, traffic policer, and foot pursuit aid installed and they definitely have brought a lot of enjoyment to the game. I haven't tried Unarmed arrests yet but I will. I love the idea of not always having to have my firearm trained on a suspect simply to arrest them for obvious reasons.

Share this post


Link to post
Share on other sites

@Cryotech Hi, good to have you here! You can take a look at the LCPD:FR API (the one for IV) and compare it to what you'll see in VS (Albo's method). There are similarities in many areas so you can learn scripting for LSPDFR from old resources.

Good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×