LSPDFR-API icon indicating copy to clipboard operation
LSPDFR-API copied to clipboard

Ability to register callbacks for Ped events

Open LSPDFR-PeterU opened this issue 9 years ago • 0 comments

I'd love the ability to be able to register callback methods for pertinent events.

For example, right now, I determine whether or not a Ped has been 'stopped' and then issued a warning by polling for Functions.IsPedStoppedByPlayer and determining if the result has changed since the last time I ran it. This works, but I don't actually know if a citation was issued, or if it was actually a warning that was given.

An ability to register a callback method for this kind of event (pullovers too!) would save polling (especially over a larger number of Peds, presumably this has a performance impact) and avoid a fairly significant burden of evaluating and checking state information.

LSPDFR-PeterU avatar Jul 09 '16 17:07 LSPDFR-PeterU