Onetap v3 Javascript callbacks

Callbacks that can be registered using Cheat.RegisterCallback().

Cheat Events

CreateMove()

Called everytime a move command is sent to the server.

UserCMD can be used during this callback.

Draw()

Called everytime a frame is rendered.

Render can be used during this callback.

FrameStageNotify()

Called everytime the frame stage changes.

Cheat.FrameStage() can be used during this callback.

Unload()

Called when the javascript is unloaded.

Material()

Warning

Undocumented callback.

CS:GO Events

You can use all CS:GO events as callbacks.

Event can be used during these callbacks.

Example:

function on_player_death() {
    entity = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    Cheat.PrintChat("\x02" + Entity.GetName(entity) + " \x01died!");
}
Cheat.RegisterCallback("player_death", "on_player_death");

Special Cheat Events

Cheat events which use Event to distribute their settings.

ragebot_fire()

Called everytime the ragebot shoots at an enemy.

Structure:

Name

Type

Description

exploit

integer

0 = no dt, 1 = 1st dt shot or hideshot, 2 = dt

target_index

integer

Entityindex of the target

hitchance

integer

Hitchance of the shot (0-100)

safepoint

integer

Targetting a safepoint

hitbox

integer

Targetted Hitboxindex

Example:

var names = ["disabled", "1st dt shot", "2nd dt shot"]
function on_ragebot_fire() {
    var exploit = Event.GetInt("exploit");
    var target = Event.GetInt("target_index");
    Cheat.Print("ragebot shot at " + Entity.GetName(target) + " (" + names[exploit] + ")\n");
}
Cheat.RegisterCallback("ragebot_fire", "on_ragebot_fire");
player_say()

Called everytime a player says something.

Structure:

Name

Type

Description

userid

integer

User id of the message author

chat

string

Content of the message

Example:

function on_player_say() {
    var entity = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    var message = Event.GetString("chat");
    Cheat.Print(Entity.GetName(entity) + " said " + message);
}
Cheat.RegisterCallback("player_say", "on_player_say")