_GET_OBJECT_FRAGMENT_COUNT
Returns the number of breakable fragments/indexed sections defined for the specified object.
0x58DE624FA7FB0E7FGetObjectFragmentCountSignature
int _GET_OBJECT_FRAGMENT_COUNT(Object object);Parameters
| Name | Type | Description |
|---|---|---|
object | Object | — |
Returns int
Description
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.
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
local retval = GetObjectFragmentCount(object)
-- always works, by hash
local retval = Citizen.InvokeNative(0x58DE624FA7FB0E7F, object, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetObjectFragmentCount(object);
// by hash
const retval = Citizen.invokeNative('0x58DE624FA7FB0E7F', object, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.