πŸ“žCallbacks list

How to use game events:

cheat.push_callback("on_event", function(event)
    if (event:get_name() == "player_hurt") then
        --- code
    end
end)

How to use callbacks:

on_paint

Fired every frame. Most functions from the render namespace can only be used here.

cheat.push_callback("on_paint", function()
    render.rect_filled(200, 200, 100, 20, color(255, 255, 255, 255))
end)

on_createmove

Fired every time the game prepares a move command. Use the parameter passed by the callback to access the UserCmd.

cheat.push_callback("on_createmove", function(cmd)
    cmd.viewangles.z = 50
end)

after_prediction

Use the parameter passed by the callback to access the UserCmd.

cheat.push_callback("after_prediction", function(cmd)
    cmd.viewangles.z = 50
end)

πŸ”— struct UserCmd

on_frame_net

Stages - enum_frames

cheat.push_callback("on_frame_net", function(stage)
    if (stage == enum_frames.frame_start) then
        cheat.notify("frame_start")
    end
end)

on_override_view

Fired every time the game prepares camera view.

cheat.push_callback("on_override_view", function(view)
    view.fov = 20
end)

on_unload

Fired when the script is about to unload.

cheat.push_callback("on_unload", function()
    cheat.notify("Script unloaded!")
end)

on_shot

Fired every time the aimbot shoots at a player.

cheat.push_callback("on_shot", function(shot_info)
    cheat.notify(shot_info.target_name)
end)

Last updated