Lua API
  • 🔎Overview
  • Introduction
    • 🚀Creating scripts
      • 🧠First Steps
      • 🖥️Adding UI
      • 📚Creating Libraries
  • API
    • 🌐Global Functions
    • ⚙️Instances
      • 🔢Math
      • ☎️Events
        • event_t
      • 🎮Game
        • global_vars_t
        • cengine_client
          • cnet_chan
        • ccsgo_input
        • cinput_system
        • cgame_ui_funcs
        • ccvar
          • convar
      • 🕹️Mods
        • events_t
      • ✏️Draw
        • ⚙️Types
          • ⚙️rect
          • ⚙️vec2
          • ⚙️color
          • ⚙️accessor
        • 🖥️Adapter
        • ✏️Layer
          • outline_mode
          • rounding
          • glow_parts
          • text_params
            • text_alignment
          • shadow_dir
          • command
            • render_mode
        • 🖼️Managed
          • 🖼️texture
            • svg_texture
            • animated_texture
          • 🖼️shader
          • ™️font_base
            • font
            • font_gdi
            • glyph_t
            • font_flags
      • 🙋Entities
        • entity_list_t
          • entity_entry_t
        • base_entity
          • schema_accessor_t
          • cs2_weapon_base_gun
          • cs2_player_pawn
          • cs2_player_controller
          • cs2_weapon_base
          • cs2_grenade_projectile
        • ccsweapon_base_vdata
          • cfiring_mode
        • chandle
        • csweapon_mode
        • csweapon_type
        • weapon_id
        • csweapon_category
        • observer_mode_t
      • 🖥️Gui
        • ⚙️Types
          • ⚙️bits
          • ⚙️control_id
        • context
          • user_t
        • context_input
          • mouse_button
        • notification_system
          • notification
        • control
          • control_type
          • value_param
          • checkbox
          • slider
          • label
          • selectable
          • button
          • color_picker
          • spacer
          • text_input
          • combo_box
          • image
        • container
          • control_container
            • layout
            • group
      • ⚙️Utils
    • ⚙️Types
      • ⚙️ptr
      • ⚙️ref_holder_t
      • ⚙️vector
      • ⚙️vector4d
      • 🎮veccolor
      • 🎮color
      • 🎮cview_setup
      • 🎮cuser_cmd
      • 🎮game_event_t
    • 🟰Enums
      • 🟰client_frame_stage
      • 🟰input_bit_mask
Powered by GitBook

© 2025 - FATALITY

On this page
  • present_queue
  • frame_stage_notify
  • render_start_pre
  • render_start_post
  • setup_view_pre
  • setup_view_post
  • override_view
  • event
  • handle_input
  • input
Export as PDF
  1. API
  2. Instances

Events

PreviousMathNextevent_t

Last updated 3 months ago

Usage: events.{event_name}

There are a number of events that Fatality provides to use in the API - from various hooks, to in-game events. Each event entry is an object of . This table documents events to be used by your scripts.

You are not required to remove events when your script unloads. It is done automatically by the API engine.

present_queue

Field

Invoked each time the game queues a frame for rendering. This is the only permitted location for drawing on screen.

Arguments

None.


frame_stage_notify

Field

Invoked every time the game progresses onto another frame stage. This event is called before the game handles a new frame stage.

Arguments

Name
Type
Description

stage

Current frame stage.


render_start_pre

Field

Invoked every time game starts the scene rendering process. This event is called before the game's function runs.

Arguments

None.


render_start_post

Field

Invoked every time game starts scene rendering process. This event is called after the game's function runs.

Arguments

Name
Type
Description

setup

View setup information.


setup_view_pre

Field

Invoked every time the game sets up the view. This event is called before the game's function runs.

Arguments

None.


setup_view_post

Field

Invoked every time the game sets up the view information. This event is called after the game's function runs.

You can retrieve the view information from game.view_render service.

Arguments

None.


override_view

Field

Invoked every time the game internally overrides view information. You are free to change whatever you like in the provided view setup.

Arguments

Name

Type

Description

setup

View setup information.


event

Field

Invoked every time a game event fires.

Arguments

Name
Type
Description

event

Game event.


handle_input

Field

Invoked every time the game processes mouse/controller input. This is a good place to alter mouse movement, if needed.

Arguments

Name
Type
Description

type

Type of the input.

value

Input value.


input

Field

Invoked every time the GUI processes input.

Arguments

Name
Type
Description

msg

int

w

int

WPARAM.

l

int

LPARAM.

We do not listen to every single event that exists in the game. If you need something that we don't listen to, please use

System message.

⚙️
☎️
event_t
client_frame_stage
cview_setup
cview_setup
game_event_t
input_type_t
ref_holder_t<float>
Documentation
mods.events