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