Events
Every event a script can handle, and what its callback receives.
Add a handler with events.<name>:add(fn) and remove it with events.<name>:remove(fn).
paint
Section titled paintevents.paint:add(function() end)Every game tick (64 a second). Draw with render.* here; the frame is kept until the next tick.
createmove
Section titled createmoveevents.createmove:add(function(cmd: Cmd) end)Every user command the game builds, after Nyx's aimbot and before its anti-aim. Read or change it with cmd:*.
frame_stage
Section titled frame_stageevents.frame_stage:add(function(stage: number) end)Every frame stage of every frame. Shares one budget per frame across all stages.
game_event
Section titled game_eventevents.game_event:add(function(name: string, e: GameEvent) end)weapon_fire, bullet_impact, player_hurt, player_death, player_spawn, round_start or round_end. e has attacker, victim, weapon, damage, armor, health, hitgroup, team and position.
level_init
Section titled level_initevents.level_init:add(function(map: string) end)A map finished loading.
level_shutdown
Section titled level_shutdownevents.level_shutdown:add(function(map: string) end)The map is being left (disconnect or map change).
menu_toggled
Section titled menu_toggledevents.menu_toggled:add(function(open: boolean) end)The Nyx menu opened or closed.
config_loaded
Section titled config_loadedevents.config_loaded:add(function(name: string) end)A config was loaded; the script's controls already show its values.
unload
Section titled unloadevents.unload:add(function() end)The script is being unloaded. Its overrides are undone after this returns.
Nyx Lua API v1 · release commit-4b659d9c3810 · d0f772c99281