> For the complete documentation index, see [llms.txt](https://neverlose.gitbook.io/neverlose/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neverlose.gitbook.io/neverlose/methods/cheat.md).

# Cheat

## void RegisterCallback(string event\_name, function callback);

Registering callbacks. Possible event names:

**draw** - game thread, allows you do draw any primitives and has safe access to any game functions. 0 arguments passed to callack.

**createmove** - createmove after cheat prediction. 1 argument passed to callback - [C\_UserCmd](https://github.com/neverlosecc/api-documentation/blob/master/C_UserCmd.md)

**prediction** - createmove inside cheat prediction. 1 argument passed to callback - [C\_UserCmd](https://github.com/neverlosecc/api-documentation/blob/master/C_UserCmd.md)

**events** - [game events](https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events). [IGameEvent](https://github.com/neverlosecc/api-documentation/blob/master/IGameEvent.md) pointer passed.

**destroy** - called when script destroyed. 0 arguments passed to callack.

## void EspText(string classname, function callback);

Registering esp(+ esp preview) callbacks. Possible class names:

**player**

**weapon**

**c4** or **bomb**

**loot**

## CheatVar Checkbox(string name);

Registers UI switch element for current lua.

## CheatVar SliderFloat(string name, float min, float max);

Registers UI slider(float) element for current lua.
