Prints all arguments seperated by tabs in the aimware console.
string)Loads the specified script.
string)Unloads the specified script.
stringReturns the filename of your script.
entities.FindByClass(name:
string): Array[Entity]
Returns a list with all entities with the matching classname.
for _, ent in ipairs(entities.FindByClass("CCSPlayer")) do
print(ent:GetName())
endEntityReturns yourself.
number): EntityReturns the entity matching the index.
number): EntityReturns the entity matches the user id.
EntityReturns the a dummy entity, useful for accessing the CCSPlayerResource proptable.
client.WorldToScreen(pos:
Vector3): number, number
Translates world position into screen position and returns it.
string, unrestrict: boolean?)Runs command in the console, you generally want to always set unrestrict to true.
string)Says the message in the global chat.
string)Says the message in the team chat.
string)Makes the FireGameEvent callback listen to the specified event.
number): stringReturns the name of the player with the matching index.
Equivalent to:
entities.GetByIndex(index):GetName()number): stringReturns the name of the player with the matching userid.
Equivalent to:
entities.GetByUserID(userid):GetName()number)Returns the following table:
| Name | Type | Description |
|---|---|---|
| Name | string | Player name |
| UserID | integer | UserID |
| SteamID | integer | Steam2 ID |
| IsBot | boolean | Is a bot |
| IsGOTV | boolean | Is GOTV |
numberReturns the index of yourself.
Equivalent to:
entities.GetLocalPlayer():GetIndex()string, value, unrestrict: boolean?)Sets the specified console variable to the specified value.
// TODO: what is unrestrict
globals.TickInterval():
number
Returns the time between each tick.
numberReturns the tick the server is on.
numberReturns the time in seconds since the game started.
numberReturns the time of the server in seconds.
numberReturns the number of rendered frames.
numberReturns the time the last frame took to render.
NOTE: According to aimware docs this might return
globals.TickIntervalin some callbacks. Useglobals.AbsoluteFrameTimeinstead.
numberReturns the time the last frame took to render.
To convert to FPS use:
math.floor(1 / globals.AbsoluteFrameTime())numberReturns the max player count of the server.
callbacks.Register(name:
string, function: function)callbacks.Register(name:
string, unique: string, function: function)
Registers a callback with the specified name and callback function.
If you specify the unique argument, you can use callbacks.Unregister to unregister the callback later.
See also: Callbacks
string, unique: string)Unregisters a previously registered callback
callbacks.Register("Draw", "ragequit", function()
client.Command("quit")
end)
callbacks.Unregister("Draw", "ragequit")draw.Color(r:
number, g: number, b: number, a: number)
Sets the RGBA color for drawing shapes and texts.
number, y1: number, x2: number, y2: number)Draws a line from x1|y1 to x2]y2 with the color.
number, y1: number, x2: number, y2: number)Draws a filled rectangle with the top left point at x1|y1 and the bottom right point at x2|y2.
number, y1: number, x2: number, y2: number)Draws the outline of a rectangle with the top left point at x1|y1 and the bottom right point at x2|y2.
number, y1: number, x2: number, y2: number, radius: number, topleft: number, topright: number, bottomleft: number, bottomright: number)Draws the outline of a rectangle with the top left point at x1|y1 and the bottom right point at x2|y2 with rounded corners.
number, y1: number, x2: number, y2: number, radius: number, topleft: number, topright: number, bottomleft: number, bottomright: number)Draws a filled rectangle with the top left point at x1|y1 and the bottom right point at x2|y2 with rounded corners.
number, y1: number, x2: number, y2: number, radius: number)Draws a filled rectangle with the top left point at x1|y1 and the bottom right point at x2|y2 and its shadow.
number, y1: number, x2: number, y2: number, x3: number, y3: number)Draws a filled triangle.
number, y: number, radius: number)Draws a filled circle at x|y with the specified radius.
number, y: number, radius: number)Draws the outline of a circle at x|y with the specified radius.
string): number, numberReturns width and height of the specified text with the current font.
number, y: number, text: string)Draws the specified text at x|y with the current font.
number, y: number, text: string)Draws the specified text at x|y with the current font and its shadow.
number, numberReturns resolution of the game (width, height).
string, height: number, weight: number): FontCreates a font with the specified height and weight and returns it.
// TODO: return?
string)Adds a .ttf font file to the available fonts.
// TODO: return?
Font)Sets current font for drawing.
RGBAData, width: number, height: number): TextureCreates a new texture with the speciifed width and height from the rgba array.
Texture, rgba: RGBAData)Updates existing texture with new rgba data.
Sets current drawing texture (use nil to reset).
Use shape drawing functions (e.g. draw.FilledRect) for drawing the texture.
// TODO
common.Time():
number
Returns the time since cheat was loaded.globals.RealTime should be preferred over this.
string): RGBAData, number, numberReturns a list of rgba colors, the width and height of the png image.
string): RGBAData, number, numberReturns a list of rgba colors, the width and height of the jpeg image.
string, scale: number): RGBAData, number, numberReturns a list of rgba colors, the width and height of the scaled svg image.
gui.GetValue(varname:
string)
Returns the value of the ui element with the specified varnamae.
Return types:
| Type | Return type | Description |
|---|---|---|
gui.Checkbox |
boolean |
Checkbox is checked |
gui.Slider |
number |
Slider value |
gui.Keybox |
number |
Key number; 0 = nothing; input.IsButtonDown |
gui.Combobox |
number |
Index of which option was selected (0 indexed) |
gui.Editbox |
string |
Entered string |
gui.ColorPicker |
number, number, number |
Picked color |
string, value)Sets the value of the specified variable to the specified value.
string): GuiObjectReturns an existing gui object.
GuiObject, varname: string, name: string, value: boolean): GuiObjectCreates a new checkbox and returns it.
GuiObject, varname: string, name: string, value: number, min: number, max: number, step: number?): GuiObjectCreates a new slider and returns it.step defaults to 1.
GuiObject, varname: string, name: string, key: number?): GuiObjectCreates a new keybox and returns it.key defaults to 0.
GuiObject, varname: string, name: string, options...: string): GuiObjectCreates a new combobox and returns it.
gui.Combobox(parent, "example.combobox", "example combobox", "option 0", "option 1", "option 2", "option 3")
local options = {"option 0", "option 1", "option 2", "option 3"}
local combobox = gui.Combobox(parent, "example.combobox", "eaxmple combobox", unpack(options))
local option = options[combobox:GetValue() + 1] -- + 1 because it's zero indexedGuiObject, varname: string, value: string?): GuiObjectCreates a new editbox and returns it.value defaults to an empty string.
GuiObject, text: string): GuiObjectCreates a new text and returns it.
GuiObject, name: string, x: number, y number, w number, h number): GuiObjectCreates a new groupbox and returns it.
GuiObject, varname: string, name: string, r: number, g: number, b: number, a: number): GuiObjectCreates a new colorpicker and returns it.
string, name: string, x: number, y: number, w: number, h: number): GuiObjectCreates a new window and returns it.
GuiObject, name: string, callback: function): GuiObjectCreates a new button and returns it.
The callback function is called everytime the button is pressed.
GuiObject, name: string): GuiObjectCreates a new multibox and returns it.
string)Executes a command in the aimware console.
Useful for setting variables that cannot be set using gui.SetValue (e.g. gui.Command('rbot.antiaim.base 90 "Desync Jitter"'))
GuiObject, varname: string, x: number, y: number, w: number, h: number, update: function, write: function, read: function): GuiObjectCreates a fully customizeable gui object and returns it.
Callbacks:
TODO: wtf do they do
GuiObject, varname: string, name: string): GuiObjectCreates a new tab and returns it.
GuiObject, varname: string, height: number, options...: string): GuiObjectCreates a new listbox and returns it.
// TODO
Note: For possible keys check Virtual Key Codes.
input.GetMousePos():
number, number
Returns the position of the mouse cursor.
number): booleanReturns whether the button is helt down or not.
number): booleanReturns whether the button is newly pressed (only for the start of the button being helt down).
Note: There is some delay before this triggers again, so rapidly pressing and unpressing a key doesn't always work.
number): booleanReturns whether the button is newly released (only for a short amount of time after the button is no longer helt down).
Note: There is some delay before this triggers again, so rapidly pressing and unpressing a key doesn't always work.
numberReturns accumulated mouse scroll.
engine.TraceLine(src:
Vector3, dst: Vector3, mask: number): Trace
Traces line from src to dst.
// TODO: example cuz it's hard
Vector3, dst: Vector3, mins: Vector3, maxs: Vector3, mask: number): TraceTraces hull from src to dst.
number, y: number, z: number)Checks if given point is inside wall, returns contents
stringReturns current map name (e.g. de_dust2).
stringReturns current server ip.
Returns loopback when hosting the server yourself.
EulerAnglesReturns your current viewangles.
EulerAngles)Sets your current viweangles.
file.Open(filename:
string, mode: string): File
mode "w" - write
mode "r" - read
mode "a" - append
Returns a file option for the specified filename.
| Mode | Description |
|---|---|
| w | opens file in write mode (previous content is overwritten) |
| r | opens file in read mode |
| a | opens file in append mode |
Warning: When trying to open a file in
read mode and the file didn't exist, this previously returnednil. This function now throws an uncatchable error (no idea how they did this)
Usefile.Enumeratefor checking if the file exists first.
string)Deletes the file.
function)Calls the callback with every filename found in the cheat directory.
string, content: string)Writes the specified content in the specified file.
string): stringReturns the content of the specified file.
Warning: Trying to read from a non-existent file will throw an uncatchable error!
http.Get(url:
string): string
http.Get(url:
string, callback: function)
If no callback is specified, this function will freeze the entire game until the ressource has been fetched.
You should never call this function without a callback unless the ressource is crucial to the execution (and you should cache the result on disk then probably too).
-- Simple nonblocking auto updater
local VERSION = "1.0.0"
http.Get("https://myserver/myscript/version", function(version)
if version == nil then return end -- nil means no internet connection
if version == VERSION then return end -- no update
http.Get("https://myserver/myscript/script.lua", function(code)
if code == nil then return end -- no connection, abort
file.Write(GetScriptName(), code)
UnloadScript(GetScriptName())
LoadScript(GetScriptName())
end)
end)Here, a vector or angle is a list of 3 numbers.
Adds 2 vectors and returns the result.
vector.Add({1, 1, 1}, {2, 2, 2}) -- {3, 3, 3}Subtracts 2 vectors and returns the result.
vector.Subtract({1, 1, 1}, {2, 2, 2}) -- {-1, -1, -1}Multiplies a vector by the specified factor nand returns the result.
vector.Multiply({5, 5, 5}, 5) -- {25, 25, 25}Divides a vector by the specified factor nand returns the result.
vector.Divide({5, 5, 5}, 2) -- {2.5, 2.5, 2.5}numberReturns the euclidean distance to the vector.
vector.Length({1, 1, 1}) -- 1.7320508075688772numberReturns the Manhattan distance to the vector.
vector.Length({1, 1, 1}) -- 3numberReturns the euclidean distance between two vectors.
Returns a normalized vector.
vector.Normalize({1, 2, 3}) -- {0.33333, 0.66666, 1}
vector.Normalize({1, 2, 3}) -- {0.16666, 0.33333, 0.5}// TODO: if greatest or sum
:network.Socket(type: string): Socket
Opens a socket and returns it.
Currently only type UDP is supported.
network.GetAddrInfo(name:
string): string
Resolves hostname to IP and returns it.
string): stringResolves IP to hostname and returns it.
Note: Reverse DNS lookups can be spoofed.
materials.Find(name: string): Material
Finds material by name and returns it.
materials.Enumerate(callback: function)
Calls the callback with every loaded material.
materials.Create(name: string, vmt: string, type: string)
Creates custom material following the Valve Material Type syntax.
panorama.RunScript(script:
string)
Runs javascript in the context of CSGO panorama UI.
Note: This module is undocumented and may change in the future.
cheat.IsFakeDucking():
boolean
Returns if you're fakeducking.
No fucking idea.
// TODO