โšกCallbacks

This thing allows the program to better interact with your script, indicating how the program should behave in the right case.

Creating Callback

To create callback you should create function and then mark program, that you can handle this case. Here a litte example of creating callback

--our callback name (can be anything, the main thing is to indicate it correctly later)
function MenuOptions()
    Menu.Button("Hello world")
end

--we tell the program that we are processing this case
--first arg its harcoded name, second its your callback function name
CreateCallback("on_menu_options", "MenuOptions")

Available Callbacks

on_create_move

Main game function to handle all player movements

Contains 3 arguments:

There is no need to return anything

on_frame_stage_notify

Something like the main tick of the game

Contains 1 argument:

  1. int (current stage)

There is no need to return anything

on_menu_options

Render some controls (like buttons, toggles, sliders and etc.) in our menu

Contains no arguments

There is no need to return anything

on_render

There you can render your ui, esp, and others visuals things using our Render class

Contains no arguments

There is no need to return anything

on_rage_player_check

There you can ignore or filter some players, so if you need you can add more checks to rage logic

Contains 2 arguments:

  1. int (enemy player index)

  2. CSPlayerController (enemy player controller)

Return false if you need to ignore player and return true if everything is OK

Last updated