RedM Natives

_GET_OBJECT_FRAGMENT_COUNT

Returns the number of breakable fragments/indexed sections defined for the specified object.

Hash0x58DE624FA7FB0E7F
Runtime nameGetObjectFragmentCount
NamespaceOBJECT
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _GET_OBJECT_FRAGMENT_COUNT(Object object);

Parameters

NameTypeDescription
objectObject—

Returns int

Description

alloc8or RDR3 NativeDB

Returns the number of breakable fragments/indexed sections defined for the specified object.
Objects without fracture data typically return 0. The returned count corresponds to the valid index range used by _DAMAGE_OBJECT_FRAGMENT_BY_INDEX.

VORPCORE RDR3natives

Returns the number of breakable fragments (indexed sections) defined for the specified object.
These fragments can be triggered individually using natives that target object fracture indices. eg: a box of bottles can have multiple fragments that can be broken individually.

Usage

Lua
local retval = GetObjectFragmentCount(object)

-- always works, by hash
local retval = Citizen.InvokeNative(0x58DE624FA7FB0E7F, object, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetObjectFragmentCount(object);

// by hash
const retval = Citizen.invokeNative('0x58DE624FA7FB0E7F', object, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x58DE624FA7FB0E7F, object);
  • 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.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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