gameEventTriggered

This event is fired after low-level game events take place, such as CEventNetworkEntityDamage. A full list of available game events can be found here.

Parameters

string name, int args[]

Examples

This example outputs all event triggers to the console, making it easier to discover what you need:

Lua Example:
AddEventHandler('gameEventTriggered', function (name, args)
  print('game event ' .. name .. ' (' .. json.encode(args) .. ')')
end)
C# Example:
// In class constructor
EventHandlers["gameEventTriggered"] += new Action<string, List<dynamic>>(OnGameEventTriggered);

// Delegate method
private void OnGameEventTriggered(string name, List<dynamic> args)
{
  Debug.WriteLine($"game event {name} ({String.Join(", ", args.ToArray())})");
}
JavaScript Example:
on("gameEventTriggered", (name, args) => {
    console.log(`Game event ${name} ${args.join(', ')}`)
});