LogoLogo
HomeGithub
2.0
2.0
  • Home
  • Scripting Reference
    • Introduction to Resources
    • Resource Manifest
    • Creating your first script
      • In JavaScript
      • In Python
      • In Lua
      • In Java
    • Events
  • API Guides
    • Terminology
    • Release Policy
  • Silica
    • Silica FAQ
Powered by GitBook
On this page
  • Using Events
  • Core Events
  • onResourceLoad
  • onResourceUnload
  • Chat Events
  • chat:addMessage

Was this helpful?

  1. Scripting Reference

Events

List of internal events Sandbox has

Using Events

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

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

PreviousIn JavaNextTerminology

Last updated 3 years ago

Was this helpful?