_GET_ENTITY_SCRIPT
Hash
0x2A08A32B6D49906FRuntime name
GetEntityScriptNamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Hash _GET_ENTITY_SCRIPT(Entity entity, Any* argStruct);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
argStruct | Any* | — |
Returns Hash
Usage
local retval, argStruct = GetEntityScript(entity, argStruct)
-- always works, by hash
local retval, argStruct = Citizen.InvokeNative(0x2A08A32B6D49906F, entity, Citizen.PointerValueIntInitialized(argStruct), Citizen.ResultAsInteger())JavaScript and C#
const [retval, argStruct] = GetEntityScript(entity, argStruct);
// by hash
const [retval, argStruct] = Citizen.invokeNative('0x2A08A32B6D49906F', entity, Citizen.pointerValueIntInitialized(argStruct), Citizen.returnResultAnyway(), Citizen.resultAsInteger());var argStruct = new OutputArgument();
int retval = Function.Call<int>((Hash)0x2A08A32B6D49906F, entity, argStruct);
// argStruct.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.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.