OnObjectDestroyed: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.2.2}} {{FuncDescription|Event called when an object instance was destroyed through DestroyObject.}} {{FuncSyntax|OnObjectDestroyed(vehicle)}} {{Fu..."
 
No edit summary
 
Line 3: Line 3:
{{FuncDescription|Event called when an object instance was destroyed through [[DestroyObject]].}}
{{FuncDescription|Event called when an object instance was destroyed through [[DestroyObject]].}}


{{FuncSyntax|OnObjectDestroyed(vehicle)}}
{{FuncSyntax|OnObjectDestroyed(object)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|object |The object which was destroyed.}}
{{FuncParam|object|The object which was destroyed.}}


== Example ==
== Example ==

Latest revision as of 20:39, 31 August 2020

OnObjectDestroyed

Type: Event
Context: Server
Introduced: v1.2.2

Description

Event called when an object instance was destroyed through DestroyObject.

Syntax

OnObjectDestroyed(object)

Parameters

  • object
    The object which was destroyed.

Example

function OnObjectDestroyed(object)
    print("Object "..object.." was destroyed")
end
AddEvent("OnObjectDestroyed", OnObjectDestroyed)

See also