RedM Natives

GET_ENTITY_SCRIPT

Hash0xB7F70784
Runtime nameGetEntityScript
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

char* GET_ENTITY_SCRIPT(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns char*

Usage

Lua
local retval = GetEntityScript(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0xb7f70784, entity, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = GetEntityScript(entity);

// by hash
const retval = Citizen.invokeNative('0xb7f70784', entity, Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0xb7f70784, entity);

Sources

Cfx.re native reference

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