Policing Redefined Events API
The PolicingRedefined API provides events that developers can subscribe to in order to help their plugins become more responsive and performant.
Delegates
OnFootTrafficStopDelegate(PRHandle handle)
This delegate is found in the OnFootTrafficStopAPI class.
public delegate void OnFootTrafficStopDelegate(PRHandle handle);
PedDelegate
public delegate void PedDelegate(Ped ped);
PedArrestedDelegate
public delegate void PedArrestedDelegate(Ped ped, Ped officer, bool frontCuffs);
TrafficStopDelegate
public delegate void TrafficStopDelegate(Ped ped, Vehicle vehicle, bool onFootTrafficStop);
VehicleStopDelegate
public delegate void VehicleStopDelegate(Vehicle vehicle);
PedInfoDelegate
public delegate void PedInfoDelegate(Ped ped);
VehicleInfoDelegate
public delegate void VehicleInfoDelegate(Vehicle vehicle, bool fromVin);
IdentificationGivenDelegate
public delegate void IdentificationGivenDelegate(Ped ped, EGivenIdentification givenIdentification);
Events
OnFootTrafficStopStarted
This event is found in the OnFootTrafficStopAPI class.
Invoked when the player starts an on-foot traffic stop.
public static event OnFootTrafficStopDelegate OnFootTrafficStopStarted;
OnFootTrafficStopEnded
This event is found in the OnFootTrafficStopAPI class.
Invoked when an on-foot traffic stop ends.
public static event OnFootTrafficStopDelegate OnFootTrafficStopEnded;
OnPedSurrendered
Invoked when a ped surrenders after e.g. being tazed.
public static event PedDelegate OnPedSurrendered;
OnPedPatDown
Invoked when a ped was pat down.
This is not invoked when a dead ped was searched.
public static event PedDelegate OnPedPatDown;
OnDeadPedSearched
Invoked when a peds dead body is searched
public static event PedDelegate OnDeadPedSearched;
OnPedArrested
Invoked when a ped was arrested through Policing Redefined's system.
This is not invoked when a ped was arrested through LSPDFR.
public static event PedArrestedDelegate OnPedArrested;
OnPedStopped
Invoked when a ped was stopped.
public static event PedDelegate OnPedStopped;
OnPedReleased
Invoked when a stopped ped was released.
The released ped might not exist in the game world anymore.
public static event PedDelegate OnPedReleased;
OnPedAskedToExitVehicle
Invoked when a ped was asked to exit the vehicle on a traffic stop.
This can also be a passenger, it doesn't need to be the driver.
public static event TrafficStopDelegate OnPedAskedToExitVehicle;
OnDriverAskedToTurnOffEngine
Invoked when the driver was asked to turn off the engine on a traffic stop.
public static event TrafficStopDelegate OnDriverAskedToTurnOffEngine;
OnVehicleStopped
Invoked when a vehicle was stopped.
See also: VehicleAPI.SetCanVehicleBeStopped
public static event VehicleStopDelegate OnVehicleStopped;
OnIdentificationGiven
Invoked when ped gives the player an ID or driver's license.
public static event IdentificationGivenDelegate OnIdentificationGiven;
OnDriverIdentificationGiven
Invoked when driver of stopped vehicle gives the player an ID or driver's license.
public static event IdentificationGivenDelegate OnDriverIdentificationGiven;
OnOccupantIdentificationGiven
Invoked when passenger of stopped vehicle gives the player an ID or driver's license.
public static event IdentificationGivenDelegate OnOccupantIdentificationGiven;
OnRequestPedCheck
Invoked when the player requests dispatch to run a peds info
public static event PedInfoDelegate OnRequestPedCheck;
OnPedRanThroughDispatch
Invoked when dispatch responds to the players request with info
public static event PedInfoDelegate OnPedRanThroughDispatch;
OnRequestVehicleCheck
Invoked when the player requests dispatch to run a vehicles info
public static event VehicleInfoDelegate OnRequestVehicleCheck;
OnVehicleRanThroughDispatch
Invoked when dispatch responds to the players request with info
public static event VehicleInfoDelegate OnVehicleRanThroughDispatch;
Enums
EGivenIdentification
Represents the type of identification given by a ped.
See also: IdentificationGivenDelegate
public enum EGivenIdentification
{
ID,
DriversLicense
}
Definitions
ID- Description: The ped gave an ID card.
DriversLicense- Description: The ped gave a driver's license.