The Lab
ENTITY native

_GET_ENTITY_SCRIPT

returns Hash2 paramsbuild 1207

Returns the hash of the script that owns the entity.

Signature

C
Hash _GET_ENTITY_SCRIPT(Entity entity, Any* argStruct); // 0x2A08A32B6D49906F b1207

Parameters

#NameType
1entityEntity
2argStructAny* (out pointer)

Facts

Facts about _GET_ENTITY_SCRIPT
Name
_GET_ENTITY_SCRIPT
Hash
0x2A08A32B6D49906F
Namespace
Returns
Hash
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local hash, argStruct = Citizen.InvokeNative(0x2A08A32B6D49906F, -- _GET_ENTITY_SCRIPT
  PlayerPedId(), -- Entity entity
  Citizen.PointerValueInt(), -- Any* argStruct
  Citizen.ResultAsInteger()
)
print(hash, argStruct)
JavaScript
const [hash, argStruct] = Citizen.invokeNative("0x2A08A32B6D49906F", // _GET_ENTITY_SCRIPT
  PlayerPedId(), // Entity entity
  Citizen.pointerValueInt(), // Any* argStruct
  Citizen.resultAsInteger()
);
console.log(hash, argStruct)
C#
var argStructArg = new OutputArgument();
int hash = Function.Call<int>((Hash)0x2A08A32B6D49906F, // _GET_ENTITY_SCRIPT
  API.PlayerPedId(), // Entity entity
  argStructArg // Any* argStruct
);
int argStruct = argStructArg.GetResult<int>();
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.