RedM Natives

_GET_PEDS_IN_COMBAT_WITH_RECENTLY

Alternate name: _GET_PEDS_DAMAGED_BY_PLAYER Returns an array of peds the player has recently attacked in a combo, tracking up to three consecutive peds.

Hash0x1A6E84F13C952094
Runtime nameGetPedsInCombatWithRecently
NamespacePLAYER
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_GET_PEDS_DAMAGED_BY_PLAYER_RECENTLY

Signature

BOOL _GET_PEDS_IN_COMBAT_WITH_RECENTLY(Player player, int recentlyMs, Any* outArray);

Parameters

NameTypeDescription
playerPlayer—
recentlyMsint—
outArrayAny*—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Alternate name: _GET_PEDS_DAMAGED_BY_PLAYER
Returns an array of peds the player has recently attacked in a combo, tracking up to three consecutive peds.
Video: https://imgur.com/gallery/0x1a6e84f13c952094-USZqpAJ

VORPCORE RDR3natives

it is used to check for that period of time if player damaged any peds only returns the last 3 hits with the entity ids so if you hit the same entity 3 times it will return the same entity id 3 times, if you hit 4 different entities within that time it will return the last 3 entity ids
only stores the last 3 hits in the data view buffer
duration is in miliseconds
you need dataview

Usage

Lua
local retval, outArray = GetPedsInCombatWithRecently(player, recentlyMs, outArray)

-- always works, by hash
local retval, outArray = Citizen.InvokeNative(0x1A6E84F13C952094, player, recentlyMs, Citizen.PointerValueIntInitialized(outArray), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outArray] = GetPedsInCombatWithRecently(player, recentlyMs, outArray);

// by hash
const [retval, outArray] = Citizen.invokeNative('0x1A6E84F13C952094', player, recentlyMs, Citizen.pointerValueIntInitialized(outArray), Citizen.returnResultAnyway());
C#
var outArray = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x1A6E84F13C952094, player, recentlyMs, outArray);
// outArray.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Examples

LUA · VORPCORE RDR3natives
Citizen.InvokeNative(0x1A6E84F13C952094, PlayerId(), 10000, dataView:Buffer())
local entity = dataView:GetInt32(8 * 1)
local entity2 = dataView:GetInt32(8 * 2)
local entity3 = dataView:GetInt32(8 * 3)
print(entity, entity2, entity3)

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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