scriptObjectDestroyed
Tells your gamemode that one of its objects was removed with objects.destroy.
Signature
Section titled “Signature”server.on("scriptObjectDestroyed", ({ object }) => void)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
object |
ScriptObject |
The object as it was. |
objects.getById(object.id) already returns undefined. Objects removed while the
gamemode loads do not send it.
Example
Section titled “Example”import { server } from "nativemp";
server.on("scriptObjectDestroyed", ({ object }) => { server.log(`Removed object ${object.id}`);});Related
Section titled “Related”objects.destroy: remove an objectscriptObjectCreated: an object was placed