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
  • real_time
  • frame_count
  • abs_frame_time
  • max_clients
  • ticks_this_frame
  • frame_time
  • cur_time
  • tick_fraction
  • tick_count
  • map_path
  • map_name
Export as PDF
  1. API
  2. Instances
  3. Game

global_vars_t

Usage:

game.global_vars.{field}

Usage: game.global_vars.{field}

An instance of this type provides a way to read several global variables that are used by the game. Changing any of the values is not and will never be supported.

real_time

Field

Type: float

Time passed since the game start, in seconds.


frame_count

Field

Type: int

Amount of frames rendered since the game start.


abs_frame_time

Field

Type: float

Absolute (averaged) frame time. It is calculated over a set of previous frame times, and should not be used for anything that requires accurate frame time like animation.


max_clients

Field

Type: int

Maximum amount of clients on the current server.


ticks_this_frame

Field

Type: int

Amount of ticks passed during the currently rendered frame. Any value above 1 might indicate a stall during rendering.


frame_time

Field

Type: float

Time, in which a previous frame was rendered. May be used for animation or by any other means that require accurate frame time.


cur_time

Field

Type: float

Time passed since the server's game start. This does not indicate the accurate time on the server, although in several events it might be synced by the software.


tick_fraction

Field

Type: float

Current tick's fractional value.


tick_count

Field

Type: int

Ticks passed since the server's game start.


map_path

Field

Type: string

Relative path to current loaded map's file.


map_name

Field

Type: string

Name of the currently loaded map.

PreviousGameNextcengine_client

Last updated 3 months ago

⚙️
🎮