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
  • get_name
  • get_bool
  • get_int
  • get_float
  • get_string
  • get_controller
  • get_pawn_from_id
Export as PDF
  1. API
  2. Types

game_event_t

Describes a game event.

get_name

Returns the event name.

Arguments

None.

Returns

Type

Description

string

Event name.

Example

if event:get_name() == 'player_hurt' then
    -- ...
end

get_bool

Returns the boolean value by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

bool

Entry value. Returns false if such key was not found.

Example

event:get_bool('some_key');

get_int

Returns the integer value by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

int

Entry value. Returns 0 if such key was not found.

Example

event:get_int('some_key');

get_float

Returns the float value by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

float

Entry value. Returns 0.0 if such key was not found.

Example

event:get_float('some_key');

get_string

Returns the string value by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

string

Entry value. Returns nil if such key was not found.

Example

event:get_string('some_key');

get_controller

If you pass a non-existent key into this function, the game might crash.

Returns the controller by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

Controller.

Example

event:get_controller('userid');

get_pawn_from_id

Returns the pawn by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

Pawn.

Example

event:get_pawn_from_id('userid');
Previouscuser_cmdNextEnums

Last updated 3 months ago

⚙️
🎮
cs2_player_controller
cs2_player_pawn