Jump to content

LSPDFR 0.4.8 API Update


LMS

Recommended Posts

  • Management Team

LSPDFR 0.4.8 introduces a few changes to how plugins work and also add many new features.

 

Plugins

Plugin loading has been changed significantly:

For the lifetime of LSPDFR (so until plugins are reloaded via RPH), all user plugins are only ever loaded (as in constructed) once and not loaded again when going off duty and going on duty again. This is because many plugins currently remain as "zombie" plugins when going off duty and are still receiving events.

 

To prevent plugins from registering the same event multiple times in Initialize when it is not freed beforehand, Initialize is now only ever called once when the plugin is first loaded. When the player goes off duty and then on duty again, it is not called again. Instead, a new method InitializeAgain is made available which can be used for stuff that needs to be done every time the plugin is activated. This method then assumes that events are properly freed in Finally so that multiple references are avoided. We've also added a default assembly resolve handler so that you do not necessarily need to include one with your mod for simple cases.

 

Callouts

We've added a CalloutCreationSource property to callouts describing the origin of the callout. In addition, you can now specify an additional advisory message for your callouts (see screenshot below) via CalloutAdvisory. Issues with the minimum and maximum distance for callouts have also been fixed.
048_callouts.png

 

New API functions

There are many new API functions in 0.4.8, please find the full list below:

  • DisplayPedId
  • DisplayVehicleRecord
  • GetPlayerRadioAction
  • IsCopBusy
  • IsPursuitCalledIn
  • PlayPlayerRadioAction
  • RemovePedFromPullover
  • RequestBackup overload to specify number of occupants
  • SetCopIgnoreAmbientCombatControl
  • SetPedAsArrested
  • SetPedAsIdentified
  • SetPlayerRadioAction
  • SetPlayerWalkStyle
  • SetPursuitAsCalledIn
  • StartPulloverOnParkedVehicle
     

Documentation

LSPD First Response.XML

 

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

  • The topic was pinned
  • 3 months later...
  • Management Team

Please note that build 7688 introduces a few fixes and additions to our API.

 

Functions

  • IsPedCuffedTaskActive
  • PlayScannerAudio overload allowing to play a shorter intro
  • RandomizeMultiplayerModelAppearance
  • SetPedAsArrested overload accepting an arresting officer
  • SetPedCuffedTask
  • SetPursuitAsCalledIn
  • SetVehicleAdvisoryText

Events

  • OnPlayerPlacedEvidenceMarker
  • OnPlayerRemovingEvidenceMarker

 

Other Changes

Persona now has a "AdvisoryText" property.

 

 

Documentation

 

LSPD First Response.XML

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...