Events

csgo.interface_handler:get_events( )

Functions

add_event

adds an event to the event manager

events:add_event( event_name )

Parameter

Data type

Description

event_name

string

Cheat Events

level_init

called once the map and all entities have been initialized

Example

local Events        = csgo.interface_handler:get_events()
local Callbacks     = fatality.callbacks

-- function to be called when a game event is fired
local function OnGameEvent(Event)
    
    local EventName = Event:get_name()
    
    -- Check if the event that is called is the one we want
    if EventName == "player_hurt" then
        print("A player was hurt")
    end
end

-- Add player_hurt to our event manager
Events:add_event("player_hurt")
-- Add our function to the events callback
Callbacks:add("events", OnGameEvent)

Last updated