The Lab
OBJECT native

DELETE_OBJECT

returns void1 parambuild 1207

Deletes the object referenced by the pointer and clears the handle.

Only works on objects the script owns, so mark world objects as mission entities first.

Signature

C
void DELETE_OBJECT(Object* object); // 0x931914268722C263 b1207

Parameters

#NameType
1objectObject* (out pointer)

Facts

Facts about DELETE_OBJECT
Name
DELETE_OBJECT
Hash
0x931914268722C263
Namespace
Returns
void
Game build
1207

Examples

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

Lua
local objectOut = Citizen.InvokeNative(0x931914268722C263, -- DELETE_OBJECT
  Citizen.PointerValueInt() -- Object* object
)
print(objectOut)
JavaScript
const objectOut = Citizen.invokeNative("0x931914268722C263", // DELETE_OBJECT
  Citizen.pointerValueInt() // Object* object
);
console.log(objectOut)
C#
var objectOutArg = new OutputArgument();
Function.Call((Hash)0x931914268722C263, // DELETE_OBJECT
  objectOutArg // Object* object
);
int objectOut = objectOutArg.GetResult<int>();
All OBJECT natives

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