_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.
0x1A6E84F13C952094GetPedsInCombatWithRecently_GET_PEDS_DAMAGED_BY_PLAYER_RECENTLYSignature
BOOL _GET_PEDS_IN_COMBAT_WITH_RECENTLY(Player player, int recentlyMs, Any* outArray);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
recentlyMs | int | — |
outArray | Any* | — |
Returns BOOL
Description
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
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
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#
const [retval, outArray] = GetPedsInCombatWithRecently(player, recentlyMs, outArray);
// by hash
const [retval, outArray] = Citizen.invokeNative('0x1A6E84F13C952094', player, recentlyMs, Citizen.pointerValueIntInitialized(outArray), Citizen.returnResultAnyway());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
InvokeNativewith the hash — it always works.
Examples
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.