Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 784 Bytes

events.md

File metadata and controls

54 lines (40 loc) · 784 Bytes
description
List of internal events Sandbox has

Events

Using Events

{% tabs %} {% tab title="JavaScript" %}

sandbox.on("event", (arg1, arg2) => {
    console.log("Example Event")
});

{% endtab %}

{% tab title="Lua" %}

AddEventHandler("event", function(arg1, arg2)
    print("Example Event")
end)

{% endtab %} {% endtabs %}

Core Events

onResourceLoad

onResourceLoad(): void

An event that is run after a resource has started.
Parameters none
Returns void
Side both

onResourceUnload

onResourceUnload(): void

An event that is run before a resource is stopped.
Parameters none
Returns void
Side both

Chat Events

chat:addMessage