GET_PLAYER_TIME_IN_PURSUIT
Gets the amount of time player has spent evading the cops.
Signature
int GET_PLAYER_TIME_IN_PURSUIT(char* playerSrc, BOOL lastPursuit);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | The target player |
lastPursuit | BOOL | False = CurrentPursuit, True = LastPursuit |
Returns int — Returns -1, if the player is not wanted or wasn't in pursuit before, depending on the lastPursuit parameter
Returns 0, if lastPursuit == False and the player has a wanted level, but the pursuit has not started yet
Otherwise, will return the milliseconds of the pursuit.
Description
Gets the amount of time player has spent evading the cops.
Counter starts and increments only when cops are chasing the player.
If the player is evading, the timer will pause.Usage
local retval = GetPlayerTimeInPursuit(playerSrc, lastPursuit)
-- always works, by hash
local retval = Citizen.InvokeNative(0x7ade63e1, playerSrc, lastPursuit, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPlayerTimeInPursuit(playerSrc, lastPursuit);
// by hash
const retval = Citizen.invokeNative('0x7ade63e1', playerSrc, lastPursuit, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x7ade63e1, playerSrc, lastPursuit);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.