RedM Natives

GET_PLAYER_TIME_IN_PURSUIT

Gets the amount of time player has spent evading the cops.

Hash0x7ADE63E1
Runtime nameGetPlayerTimeInPursuit
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int GET_PLAYER_TIME_IN_PURSUIT(char* playerSrc, BOOL lastPursuit);

Parameters

NameTypeDescription
playerSrcchar*

The target player

lastPursuitBOOL

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

Cfx.re native reference

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

Lua
local retval = GetPlayerTimeInPursuit(playerSrc, lastPursuit)

-- always works, by hash
local retval = Citizen.InvokeNative(0x7ade63e1, playerSrc, lastPursuit, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerTimeInPursuit(playerSrc, lastPursuit);

// by hash
const retval = Citizen.invokeNative('0x7ade63e1', playerSrc, lastPursuit, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x7ade63e1, playerSrc, lastPursuit);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.