Neverlose
  • Welcome
  • Official Website
  • Useful information
    • 📲Quick start
    • â›Šī¸Common knowledge
    • 🧠Examples
      • âš™ī¸Materials
      • âš™ī¸Color
      • âš™ī¸Vector
      • âš™ī¸ESP
      • âš™ī¸ConVars
      • âš™ī¸UI
  • Documentation
    • 📓Events
    • âš™ī¸Variables
      • 🌎_G
      • đŸ—„ī¸bit
      • 🌈color
      • ⌚common
      • 🎲cvar
      • 💾db
      • 👾entity
      • 👩‍đŸ’ģesp
      • đŸ—ŗī¸events
      • 📂files
      • 📎globals
      • 🔓json
      • ✨materials
      • đŸ”ĸmath
      • đŸ’ģui
      • â˜ī¸network
      • 🌃panorama
      • đŸ’ĸrage
      • 🎨render
      • 🧰utils
      • 📍vector
Powered by GitBook
On this page
  • Functions:
  • :set
  • :unset
  • :call
  • Alternative behavior:
  • :__call
  1. Documentation
  2. Variables

events

PreviousespNextfiles

Last updated 2 years ago

Functions:

Available cheat events can be found .

:set

events.event_name:set(callback: function)

Name
Type
Description

callback

function

Lua function to call

Sets the callback for the specified event. The registered function will be called every time the specified event occurs.

:unset

events.event_name:unset(callback: function)

Name
Type
Description

callback

function

Lua function that was passed to the :set function

Unsets the callback that was set via the :set function from the specified event.

:call

events.event_name:call(...)

Name
Type
Description

...

Arguments to be passed by the callback

Fires the specified event.

Alternative behavior:

:__call

events.event_name(callback: function[, state: boolean])

Name
Type
Description

callback

function

Lua function to call

state

boolean

Optional. Callback state. If not specified then toggles the callback state for the specified function.

Sets / unsets the callback for the specified event.

local function function_callback()
    print(globals.tickcount)
end

-- Sets the createmove callback for the specified function
events.createmove(function_callback)

-- Execute after 0.5 secs
utils.execute_after(0.5, function()
    -- Toggles the createmove callback for the specified function
    events.createmove(function_callback)
end)
local function function_callback()
    print(globals.tickcount)
end

events.createmove(function_callback, true) -- Sets the callback
events.createmove(function_callback, false) -- Unsets the callback
âš™ī¸
đŸ—ŗī¸
here