-
Автор темы
- #1
ну для тех кто не знал
Код:
local events = {}
events.names = {
shutdown = e_callbacks.SHUTDOWN,
render = e_callbacks.PAINT,
antiaim = e_callbacks.ANTIAIM,
setup = e_callbacks.SETUP_COMMAND,
hit = e_callbacks.AIMBOT_HIT,
miss = e_callbacks.AIMBOT_MISS,
shoot = e_callbacks.AIMBOT_SHOOT,
}
setmetatable(events, {__index = function(self, key)
return {
set = function(self, func)
local callback_name = events.names[key]
if callback_name == nil then
return callbacks.add(e_callbacks.EVENT, func, key)
end
callbacks.add(callback_name, func)
end
}
end})
--@note: test
events.antiaim:set(function(ctx)
ctx:set_pitch(45)
end)
events.round_start:set(function()
print 'round start'
end)