{% hint style="info" %} To register a callback, you can call Cheat.RegisterCallback function. {% endhint %}
This callback will be executed in game thread, it allows you do draw any primitives and has safe access to any game functions
Cheat.RegisterCallback("draw", function()
Render.Text("Hello world, it's me", Vector2.new(10.0, 15.0), Color.new(1.0, 1.0, 1.0), 16)
end)CreateMove callback before cheat prediction, if you need to modify something before prediction and/or ragebot/antiaims/etc, you can do it there
| Name | Type | Description |
|---|---|---|
| command | C_UserCmd | Createmove command |
Cheat.RegisterCallback("pre_prediction", function(cmd)
cmd.forwardmove = 120
end)CreateMove callback inside cheat prediction, if you need to modify something inside prediction and/or before ragebot/antiaims/etc, you can do it there
| Name | Type | Description |
|---|---|---|
| command | C_UserCmd | Createmove command |
Cheat.RegisterCallback("prediction", function(cmd)
AntiAim.OverridePitch(90) -- UP
end)CreateMove callback after cheat prediction
| Name | Type | Description |
|---|---|---|
| command | C_UserCmd | Createmove command |
Cheat.RegisterCallback("createmove", function(cmd)
print("My forwardmove is " .. tostring(cmd.forwardmove))
end)This callback will be executed whenever new game event will be executed
| Name | Type | Description |
|---|---|---|
| event | IGameEvent | Event |
{% hint style="info" %} A list of events can be found here. {% endhint %}
cheat.RegisterCallback("events", function(event)
if event:GetName() ~= "player_death" then return end
print(tostring(event:GetInt("userid")) .. " was killed by " .. tostring(event:GetInt("attacker")))
end)This callback will be called before script unload, so you can revert changes inside this callback
Cheat.RegisterCallback("destroy", function()
print("Bye-bye")
end)This callback will be executed on every frame stage.
| Name | Type | Description |
|---|---|---|
| stage | number | Stage number |
{% hint style="info" %} A list of stages can be found here. {% endhint %}
Cheat.RegisterCallback("frame_stage", function(stage)
if stage ~= 5 then return end
print("render_start")
end)This callback will be executed whenever the user enters something into the console
| Name | Type | Description |
|---|---|---|
| text | string | Text |
Cheat.RegisterCallback("console", function(text)
print("Input text was: '" .. text .. "'")
end)This callback will be executed whenever server registers ragebot shot More information on the passed parameter RegisteredShot can be found here
| Name | Type | Description |
|---|---|---|
| shot | RegisteredShot | Information about shot |
Cheat.RegisterCallback("registered_shot", function(shot)
print("[SHOT] hc: " .. tostring(shot.hitchance) .. " | backtrack: " .. tostring(shot.backtrack) .. " | hitgroup: " .. tostring(shot.hitgroup) .. " | damage: " .. tostring(shot.damage) .. " | target: " .. tostring(shot.target_index))
end)This callback will be executed whenever ragebot shoot More information on the passed parameter RagebotShot can be found here
| Name | Type | Description |
|---|---|---|
| shot | RagebotShot | Information about shot |
Cheat.RegisterCallback("ragebot_shot", function(shot)
print("[SHOT] hc: " .. tostring(shot.hitchance) .. " | backtrack: " .. tostring(shot.backtrack) .. " | hitgroup: " .. tostring(shot.hitgroup) .. " | damage: " .. tostring(shot.damage) .. " | target: " .. tostring(shot.target_index))
end)This callback will be executed when other players shooting
| Name | Type | Description |
|---|---|---|
| shot | DT_FireBullets | Information about bullet |
Cheat.RegisterCallback("fire_bullet", function(bullet)
print(tostring(bullet.m_iPlayer) .. " is shooting")
end)This callback will be executed when game is calculating view
| Name | Type | Description |
|---|---|---|
| setup | CViewSetup | View setup |
Cheat.RegisterCallback("override_view", function(setup)
print("field of view is " .. tostring(setup.fov))
end)