Title
Create new category
Edit page index title
Edit category
Edit link
Misc
Miscellaneous API features which I couldn't categorise anywhere else.
You can get up to date offsets directly from within Orbit. The usage may be a bit tricky, so make sure to pay attention to not mess up something accidentally.
You first need to define a table of string elements, which reflects the path to the offset. To understand the structure of the offsets, just head over to "Resources/Offsets". Here you will see the data structure of the generated JSON files. Currently, Orbit only supports accessing "client.dll" and "offsets".
Sometimes, getting the value of an offset can result in quite a long line of code. Don't worry though, since these paths rarely change from one cs2 update to the next, so that long line will probably feed you the correct offset for a long time.
"GetScreenSize" returns a Vector2D object containing the width and height of the screen.
"IsInGame" returns true if we are connected to a game.
"GetMapName" returns the current map name without the path and extension.
"GetAppDataDirectory" helps you store your downloaded files. You can also get the windows username, since the path to the appdata folder contains it.
Since Orbit V11.0.6 this function is deprecated, as the tie to AppData was removed.
Instead, this function returns the path to the Resources folder Orbit is shipped with.
"DirectoryExists" in combination with "GetAppDataDirectory" can tell you if a download was successful or not. A failed download can be a result of 2 things: http functions are disabled, download link is invalid.
"PlaySound" lets you play a sound file. You don't need to specify a path if the sound file is where Orbit is located.
"RayCast" uses the built in VPK Parser in Orbit to perform a visible check based on the arguments, which are 2 Vector3D objects.
The return value is a bool, true if visible, false if not.
"GetTime" simply returns the time since epoch with millisecond accuracy.
Can be used to do simple timers in LUA.
Play a sound file from the virtual audio device (into the microphone)
Make sure the menu is closed when calling this function
Executes any in‑game command that a player could normally trigger through their own inputs (chat messages, movement keys, action keys, etc.).
Instead of pressing keys or typing manually, Lua scripts can perform those actions automatically.
Orbit does not bypass protected convars, so executing "sv_cheats 1" won't do anything.