Skip to content

game_event

Methods

get_name(): string

Returns name of current event

1
2
3
if ev:get_name() == 'player_hurt' then
    -- ...
end

get_float(name, def): number

Type Name Description Default
string name Key name to get value of none
number def Default value none

Returns float value of game event

1
local val = ev:get_float('x', 0)

get_int(name, def): number

Type Name Description Default
string name Key name to get value of none
number def Default value none

Returns int value of game event

1
local val = ev:get_int('userid', 0)

get_uint64(name, def): number

Type Name Description Default
string name Key name to get value of none
number def Default value none

Returns unsigned int64 value of game event

1
local val = ev:get_uint64('entityid', 0)

get_string(name, def): string

Type Name Description Default
string name Key name to get value of none
string def Default value none

Returns string value of game event

1
local val = ev:get_string('weapon', 'weapon_unknown')

get_bool(name, def): bool

Type Name Description Default
string name Key name to get value of none
bool def Default value none

Returns bool value of game event

1
local val = ev:get_bool('haskit', false)