Snippets are your “functions” or logic to execute when a listener triggers.
SNIPPET_EntitySpawned("es_snippet_to_execute", (entity, payload) => {
// do stuff here!
})
"es_snippet_to_execute": First parameter is the snippet name. Listeners with the samesnippetvalue will trigger this snippet.
(entity, ...): Each snippet will be provided a set number of arguments to operate on. See the documentation for more details on each snippet type.(..., payload): The last argument for any snippet is always the payload.