### Example Usage of Callbacks Source: https://fedoraware.github.io/Docs/Lua/callbacks Demonstrates how to register and unregister a callback for the CreateMove event. ```APIDOC ```lua function OnCreateMove(userCmd) print("Forward movement: " .. userCmd:GetForwardMove()) end Callbacks.Unregister("CreateMove", "Example_CreateMove") Callbacks.Register("CreateMove", "Example_CreateMove", OnCreateMove) ``` ``` -------------------------------- ### Draw Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called every time the game starts drawing. Use this to draw custom shapes and elements on the screen. ```APIDOC ## Draw() ### Description This callback is triggered every time the game initiates its drawing process. It provides an opportunity to render custom graphics or UI elements onto the game screen. ``` -------------------------------- ### AbsFrameTime() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the absolute time in seconds since the game started. ```APIDOC ## AbsFrameTime() ### Description Returns the absolute time in seconds since the game started. ### Returns - `number`: The absolute time in seconds since game start. ``` -------------------------------- ### Get Local Player Ping Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Retrieves and prints the ping of the local player. Ensure Entities.GetLocalPlayer() and Entities.GetPlayerResource() are available. ```lua local localPlayer = Entities.GetLocalPlayer() local index = localPlayer:GetIndex() local playerResource = Entities.GetPlayerResource() print("Ping: " .. playerResource:GetPing(index)) ``` -------------------------------- ### CurrentTargetIdx() Source: https://fedoraware.github.io/Docs/Lua/Helpers/fedoraware Gets the current index of the aimbot target. ```APIDOC ## CurrentTargetIdx() ### Description Current index of the aimbot target. ### Method Lua Function ### Endpoint N/A ### Parameters None ### Response - **target_index** (number) - The index of the current aimbot target. ``` -------------------------------- ### Print Message to Chat Source: https://fedoraware.github.io/Docs/Lua/Interfaces/client Prints a message to the client's chat window without sending it to other players. Requires getting the client interface first. ```lua local Client = Interfaces.GetClient() Client:ChatPrintf("Hello, World!") ``` -------------------------------- ### Get Current View Angles Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Retrieves and prints the current view angles (pitch, yaw, roll) of the player. Requires an active game connection. ```lua local Engine = Interfaces.GetEngine() local viewAngles = Engine:GetViewAngles() print("Viewangles: " .. viewAngles.x .. " " .. viewAngles.y .. " " .. viewAngles.z) ``` -------------------------------- ### FrameStageNotify Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called at different stages of the frame rendering process (start, rendering, end). ```APIDOC ## FrameStageNotify(ClientFrameStage) ### Description This callback is invoked at various points during the frame rendering pipeline, including the beginning, during rendering, and at the end of a frame. The current frame stage is provided as a parameter. ### Parameters * **ClientFrameStage** (enum) - An indicator of the current stage within the frame rendering process. ``` -------------------------------- ### SetUpMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets the up/down movement value for the user command. ```APIDOC ## SetUpMove(move) ### Description Sets the up/down movement for the user command. ### Parameters #### Path Parameters - **move** (number) - Required - The up/down movement amount to set. ``` -------------------------------- ### ExecuteCommand Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Executes a given command without restrictions. ```APIDOC ## ExecuteCommand(command) ### Description Executes a command without restrictions. ### Parameters #### Path Parameters - **command** (string) - Required - The command to execute. ``` -------------------------------- ### Vec2 Constructors Source: https://fedoraware.github.io/Docs/Lua/Classes/vec2 Provides documentation for the two constructors of the Vec2 class. ```APIDOC ## Vec2() ### Description Returns a new `Vec2` object with `x` and `y` fields set to `0`. ### Method Constructor ### Parameters None ### Response Example ```json { "x": 0, "y": 0 } ``` ## Vec2(x, y) ### Description Returns a new `Vec2` object with set `x` and `y` fields. ### Method Constructor ### Parameters - **x** (number) - The x-coordinate. - **y** (number) - The y-coordinate. ### Response Example ```json { "x": x, "y": y } ``` ``` -------------------------------- ### CreateMove Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called every time an user update is going to be sent to the server. Use this to modify movement and perform interactive actions. ```APIDOC ## CreateMove(UserCmd) ### Description This callback is invoked each time a user update is prepared to be sent to the server. It allows for the modification of player movement and other interactive game elements. ### Parameters * **UserCmd** (object) - An object representing the user's command, containing movement and other input data. ``` -------------------------------- ### Register and Unregister Callbacks Source: https://fedoraware.github.io/Docs/Lua/callbacks Demonstrates how to register a callback function for the 'CreateMove' event and then unregister it. Ensure unique names are used for callbacks to avoid conflicts. ```lua function OnCreateMove(userCmd) print("Forward movement: " .. userCmd:GetForwardMove()) end Callbacks.Unregister("CreateMove", "Example_CreateMove") Callbacks.Register("CreateMove", "Example_CreateMove", OnCreateMove) ``` -------------------------------- ### MaxClients() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the maximum number of clients allowed in the game. ```APIDOC ## MaxClients() ### Description Returns the maximum number of clients allowed in the game. ### Returns - `number`: The maximum client count. ``` -------------------------------- ### GameEvent Methods Source: https://fedoraware.github.io/Docs/Lua/Classes/game-event This section details the available methods for interacting with GameEvent objects. ```APIDOC ## GameEvent Used in the `FireGameEvent` callback. Contains the event data. You can find more information about game events on the Alliedmods Wiki. ### Methods #### `IsValid()` Returns if the instance is valid. This runs before every other function. #### `GetName()` Returns the name of the event as a string. #### `GetBool(key)` Returns the value of the specified key as a boolean. #### `GetInt(key)` Returns the value of the specified key as an integer. #### `GetFloat(key)` Returns the value of the specified key as a float. #### `GetString(key)` Returns the value of the specified key as a string. #### `SetBool(key, value)` Sets the value of the specified key as a boolean. #### `SetInt(key, value)` Sets the value of the specified key as an integer. #### `SetFloat(key, value)` Sets the value of the specified key as a float. #### `SetString(key, value)` Sets the value of the specified key as a string. ``` -------------------------------- ### RealTime() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the current real-time in seconds. ```APIDOC ## RealTime() ### Description Returns the current real-time in seconds. ### Returns - `number`: The current real-time in seconds. ``` -------------------------------- ### SetButtons Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets the buttons for the user command. ```APIDOC ## SetButtons(buttons) ### Description Sets the buttons for the user command. ### Parameters #### Path Parameters - **buttons** (number) - Required - The numerical value representing the buttons to set. ``` -------------------------------- ### Vec2 Methods Source: https://fedoraware.github.io/Docs/Lua/Classes/vec2 Provides documentation for the methods of the Vec2 class. ```APIDOC ## Normalize() ### Description Normalizes the values. ### Method Instance Method ### Parameters None ## Length() ### Description Returns the length of the current vector. ### Method Instance Method ### Parameters None ## LengthSqr() ### Description Returns the squared length of the vector (x² + y²). ### Method Instance Method ### Parameters None ## DistTo(Vec2) ### Description Returns the distance to the given vector. ### Method Instance Method ### Parameters - **vector** (Vec2) - The target vector. ## DistToSqr(Vec2) ### Description Returns the squared distance of 2 vectors. ### Method Instance Method ### Parameters - **vector** (Vec2) - The target vector. ## Dot(Vec2) ### Description Calculates the dot product of the two vectors. ### Method Instance Method ### Parameters - **vector** (Vec2) - The other vector. ``` -------------------------------- ### GetScreenSize Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Returns the current screen dimensions. ```APIDOC ## GetScreenSize() ### Description Returns the screen size. ### Returns - Vec3: A vector representing the screen width, height, and potentially depth. ``` -------------------------------- ### GetMaxClients Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Returns the maximum number of clients allowed in the game. ```APIDOC ## GetMaxClients() ### Description Returns the maximum amount of players. ### Returns - number: The maximum number of clients. ``` -------------------------------- ### BaseCombatWeapon Methods Source: https://fedoraware.github.io/Docs/Lua/Classes/weapon This section details the methods available for the BaseCombatWeapon entity. ```APIDOC ## BaseCombatWeapon An entity that is a weapon. Only contains weapon specific functions. You can also extract the entity of the weapon and use it as a normal entity. ### Methods #### `IsValid()` If the entity is valid. Returns a bool. This runs before every other function. #### `GetEntity()` Returns the entity of the weapon as a BaseEntity. #### `GetName()` Returns the name of the weapon as a string. #### `CanShoot()` Returns if the weapon can shoot right now. #### `GetClip1()` Returns the ammo of clip 1 as a number. #### `GetClip2()` Returns the ammo of clip 2 as a number. #### `GetSlot()` Returns the slot of the weapon as a number. #### `GetWeaponID()` Returns the weapon ID of the weapon as a number. #### `IsInReload()` Returns if the weapon is currently reloading. #### `GetDamage()` Returns the damage of the weapon. #### `GetBulletsPerShot()` Returns the bullets per shot of the weapon. ``` -------------------------------- ### Vec3 Methods Source: https://fedoraware.github.io/Docs/Lua/Classes/vec3 Lists and describes the available methods for Vec3 objects, including cross product, dot product, distance calculations, and length. ```APIDOC ## Methods ### `Cross(Vec3)` Calculates the cross product of the two vectors. ### `Dot(Vec3)` Calculates the dot product of the two vectors. ### `DistTo(Vec3)` Returns the distance to the given vector. ### `DistToSqr(Vec3)` Returns the squared distance of 2 vectors ### `IsZero()` Returns whether the vector is all zeros. ### `Length()` Returns the length of the current vector. ``` -------------------------------- ### GetPing Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the ping of the player with the given index. ```APIDOC ## GetPing(index) ### Description Returns the ping of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### Draw Shifted Ticks on Screen Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Demonstrates how to set the drawing color and display shifted tick information using the Draw interface within a registered Draw callback. ```lua local Draw = Interfaces.GetDraw() function OnDraw() Draw:SetColor(255, 0, 0, 255) Draw:Text(40, 80, "Shifted Ticks: " .. Fedoraware.ShiftedTicks()) end Callbacks.Unregister("Draw", "Example_Draw") Callbacks.Register("Draw", "Example_Draw", OnDraw) ``` -------------------------------- ### Vec3 Constructors Source: https://fedoraware.github.io/Docs/Lua/Classes/vec3 Provides two constructors for creating Vec3 objects: one with default zero values and one with specified coordinates. ```APIDOC ## Constructor ### `Vec3()` Returns a new `Vec3` object with `x`, `y` and `z` fields set to `0`. ### `Vec3(x, y, z)` Returns a new `Vec3` object with set `x`, `y` and `z` fields. ``` -------------------------------- ### CurTime() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the current time in seconds. ```APIDOC ## CurTime() ### Description Returns the current time in seconds. ### Returns - `number`: The current time in seconds. ``` -------------------------------- ### ShouldShift() Source: https://fedoraware.github.io/Docs/Lua/Helpers/fedoraware Determines if the game ticks should be shifted. ```APIDOC ## ShouldShift() ### Description Returns if the ticks should be shifted. ### Method Lua Function ### Endpoint N/A ### Parameters None ### Response - **should_shift** (boolean) - True if ticks should be shifted, false otherwise. ``` -------------------------------- ### Print Current Tick Count Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info This snippet demonstrates how to retrieve the current tick count using the GlobalInfo.TickCount() function and print it to the console. ```lua print(GlobalInfo.TickCount()) ``` -------------------------------- ### BaseEntity Constructor Source: https://fedoraware.github.io/Docs/Lua/Classes/entity Creates a BaseEntity object from a given entity pointer. This is useful when iterating through entity pointers. ```APIDOC ## Constructor ### `BaseEntity(entityPointer)` Creates a entity object from a pointer. You can use this when looping through a list of entity pointers. ``` -------------------------------- ### GetLevelName Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Returns the name of the current map being played. ```APIDOC ## GetLevelName() ### Description Returns the name of the current map. ### Returns - string: The name of the current level. ``` -------------------------------- ### W2S(Vec3) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Converts a 3D world coordinate to 2D screen space coordinates. ```APIDOC ## W2S(Vec3) ### Description Converts a Vec3 world coordinate into Vec2 screen space coordinates. Returns Vec2(0, 0) if not on screen. ### Parameters - **Vec3** (object) - A vector representing the world coordinates (e.g., {x=10, y=20, z=30}). ### Returns - **Vec2** (object) - A vector representing the screen coordinates (e.g., {x=100, y=200}), or {x=0, y=0} if the point is not on screen. ``` -------------------------------- ### Line(x, y, x1, y1) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Draws a line on the screen between two points. ```APIDOC ## Line(x, y, x1, y1) ### Description Draws a line on the screen. ### Parameters - **x** (number) - The x-coordinate of the starting point. - **y** (number) - The y-coordinate of the starting point. - **x1** (number) - The x-coordinate of the ending point. - **y1** (number) - The y-coordinate of the ending point. ``` -------------------------------- ### Text(x, y, text) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Draws a text string on the screen at the specified coordinates. ```APIDOC ## Text(x, y, text) ### Description Draws a text string on the screen. ### Parameters - **x** (number) - The x-coordinate for the text. - **y** (number) - The y-coordinate for the text. - **text** (string) - The text to draw. ``` -------------------------------- ### GetMousePos() Source: https://fedoraware.github.io/Docs/Lua/Helpers/input Retrieves the current position of the mouse cursor on the screen. ```APIDOC ## GetMousePos() ### Description Returns the mouse position as a Vec2. ### Response #### Success Response (200) - **Vec2** (object) - The current mouse coordinates. Contains `x` and `y` properties. ``` -------------------------------- ### DispatchUserMessage Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called every time the game receives a user message from the server, such as chat messages or voice menu interactions. ```APIDOC ## DispatchUserMessage(UserMessage) ### Description This callback is triggered upon receiving a user message from the server. It handles various forms of communication, including chat messages and voice menu interactions. ### Parameters * **UserMessage** (object) - An object representing the user message received from the server. ``` -------------------------------- ### Seek Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Sets the message reader to the specified bit position. ```APIDOC ## Seek(bit) ### Description Sets the message reader to the specified bit. ### Method `Seek(bit)` ### Parameters #### Path Parameters - **bit** (number) - Required - The bit position to seek to. ``` -------------------------------- ### Reset Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Resets the message reader to the beginning. ```APIDOC ## Reset() ### Description Resets the message reader to the beginning. ### Method `Reset()` ``` -------------------------------- ### GetPlayerResource Source: https://fedoraware.github.io/Docs/Lua/Helpers/entities Retrieves the player resource object for accessing player information. ```APIDOC ## GetPlayerResource() ### Description Returns the player resource to get information about the players as a PlayerResource object. ### Returns - PlayerResource: An object containing information about all players. ``` -------------------------------- ### Rect(x, y, w, h) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Draws a filled rectangle on the screen. ```APIDOC ## Rect(x, y, w, h) ### Description Draws a filled rectangle on the screen. ### Parameters - **x** (number) - The x-coordinate of the top-left corner. - **y** (number) - The y-coordinate of the top-left corner. - **w** (number) - The width of the rectangle. - **h** (number) - The height of the rectangle. ``` -------------------------------- ### FrameCount() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the current frame count of the game. ```APIDOC ## FrameCount() ### Description Returns the current frame count of the game. ### Returns - `number`: The current frame count. ``` -------------------------------- ### GetLocalPlayer Source: https://fedoraware.github.io/Docs/Lua/Helpers/entities Retrieves the local player entity. ```APIDOC ## GetLocalPlayer() ### Description Returns the local player as a BaseEntity. ### Returns - BaseEntity: The local player entity. ``` -------------------------------- ### SetViewAngles Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets the view angles for the user command. ```APIDOC ## SetViewAngles(angles) ### Description Sets the viewangles for the user command. ### Parameters #### Path Parameters - **angles** (Vec3) - Required - The 3D vector representing the viewangles to set. ``` -------------------------------- ### GetValid Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the valid status of the player with the given index. ```APIDOC ## GetValid(index) ### Description Returns the valid status of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### FireGameEvent Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called every time the game receives an event from the server. Use this to perform specific actions based on in-game events. ```APIDOC ## FireGameEvent(GameEvent) ### Description This callback is invoked whenever the game processes an event received from the server. It is useful for executing specific logic in response to game occurrences such as player deaths or damage. ### Parameters * **GameEvent** (object) - An object representing the game event that occurred. ``` -------------------------------- ### ChatPrintf Source: https://fedoraware.github.io/Docs/Lua/Interfaces/client Prints a message to the client's chat window without sending it to other players. ```APIDOC ## ChatPrintf(msg) ### Description Prints the given message in the chat without sending it to other players. ### Parameters #### Path Parameters - **msg** (string) - Required - The message to print in the chat. ### Request Example ```lua local Client = Interfaces.GetClient() Client:ChatPrintf("Hello, World!") ``` ### Response This method does not return any value. ``` -------------------------------- ### Register Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Registers a callback function for a specific event type and name. ```APIDOC ## Register(type, name, callback) ### Description This function registers a callback to be executed when a specific event occurs. You provide the type of event, a unique name for the callback, and the function to be called. ### Parameters * **type** (string) - The type of the callback event (e.g., "CreateMove"). * **name** (string) - A unique identifier for this specific callback registration. * **callback** (function) - The function to be executed when the event is triggered. ``` -------------------------------- ### Vec2 Fields Source: https://fedoraware.github.io/Docs/Lua/Classes/vec2 Documentation for the fields of the Vec2 class. ```APIDOC ## Fields ### x #### Description X-coordinate. ### y #### Description Y-coordinate. ``` -------------------------------- ### GetTeam Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the team of the player with the given index. ```APIDOC ## GetTeam(index) ### Description Returns the team of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### GetUpMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Retrieves the current up/down movement value. ```APIDOC ## GetUpMove() ### Description Returns the current up/down movement value. ### Returns - number: The up/down movement amount. ``` -------------------------------- ### GetLocalWeapon Source: https://fedoraware.github.io/Docs/Lua/Helpers/entities Retrieves the local player's weapon entity. ```APIDOC ## GetLocalWeapon() ### Description Returns the local weapon as a BaseCombatWeapon. ### Returns - BaseCombatWeapon: The local player's weapon entity. ``` -------------------------------- ### SetForwardMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets the forward movement value for the user command. ```APIDOC ## SetForwardMove(move) ### Description Sets the forward movement for the user command. ### Parameters #### Path Parameters - **move** (number) - Required - The forward movement amount to set. ``` -------------------------------- ### GetButtons Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Retrieves the currently pressed movement and interaction buttons as a numerical value. ```APIDOC ## GetButtons() ### Description Returns the currently pressed movement/interaction buttons. ### Returns - number: A numerical representation of the pressed buttons. ``` -------------------------------- ### GetDamage Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the damage of the player with the given index. ```APIDOC ## GetDamage(index) ### Description Returns the damage of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### IsAlive Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns if the player with the given index is alive. ```APIDOC ## IsAlive(index) ### Description Returns if the player with the given index is alive. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### GetKills Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the kills of the player with the given index. ```APIDOC ## GetKills(index) ### Description Returns the kills of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### FilledCircle(x, y, radius) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Draws a filled circle on the screen. ```APIDOC ## FilledCircle(x, y, radius) ### Description Draws a filled circle on the screen. ### Parameters - **x** (number) - The x-coordinate of the center. - **y** (number) - The y-coordinate of the center. - **radius** (number) - The radius of the circle. ``` -------------------------------- ### GetConnected Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the connected status of the player with the given index. ```APIDOC ## GetConnected(index) ### Description Returns the connected status of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### GetType Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Returns the type of the message as a number. ```APIDOC ## GetType() ### Description Returns the type of the message as a number. ### Method `GetType()` ### Returns - `number`: The type of the message. ``` -------------------------------- ### IsConnected Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Checks if the player is connected to the game server. Returns a boolean value. ```APIDOC ## IsConnected() ### Description Checks if the player is connected to the server. ### Returns - bool: True if the player is connected, false otherwise. ``` -------------------------------- ### GetDataBits Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Returns the total number of bits in the message. ```APIDOC ## GetDataBits() ### Description Returns the number of bits in the message. ### Method `GetDataBits()` ### Returns - `number`: The total number of bits in the message. ``` -------------------------------- ### FrameTime() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the time elapsed per frame. ```APIDOC ## FrameTime() ### Description Returns the time elapsed per frame. ### Returns - `number`: The time per frame in seconds. ``` -------------------------------- ### AntiAim Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Called every time the anti-aim is calculated. isReal indicates if the anti-aim angles will be sent to the server. ```APIDOC ## AntiAim(UserCmd, isReal) ### Description This callback is executed each time the anti-aim system calculates its angles. The `isReal` parameter specifies whether the calculated angles are intended for the server. ### Parameters * **UserCmd** (object) - The user command object associated with the current frame. * **isReal** (boolean) - True if the anti-aim angles are intended for the server, false otherwise. ``` -------------------------------- ### GetForwardMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Retrieves the current forward movement value. ```APIDOC ## GetForwardMove() ### Description Returns the current forward movement value. ### Returns - number: The forward movement amount. ``` -------------------------------- ### TickCount() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the current tick count of the game. ```APIDOC ## TickCount() ### Description Returns the current tick count of the game. ### Returns - `number`: The current tick count. ``` -------------------------------- ### GetPlayerName Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the name of the player with the given index. ```APIDOC ## GetPlayerName(index) ### Description Returns the name of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### ReadFloat Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Reads and returns the next float from the message. ```APIDOC ## ReadFloat() ### Description Reads and returns the next float in the message as a number. ### Method `ReadFloat()` ### Returns - `number`: The float read from the message. ``` -------------------------------- ### GetViewAngles Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Retrieves the current view angles of the user. ```APIDOC ## GetViewAngles() ### Description Returns the current viewangles. ### Returns - Vec3: The viewangles as a 3D vector. ``` -------------------------------- ### ReadString Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Reads and returns a string of a specified length from the message. ```APIDOC ## ReadString(length) ### Description Reads and returns the next string of a given length in the message as a string. ### Method `ReadString(length)` ### Parameters #### Path Parameters - **length** (number) - Required - The length of the string to read. ``` -------------------------------- ### IsDown(key) Source: https://fedoraware.github.io/Docs/Lua/Helpers/input Checks if a specific key is currently being held down. The input `key` should be a numerical Virtual-Key Code. ```APIDOC ## IsDown(key) ### Description Returns whether the given key is down. The key is a Virtual-Key Code as a number. ### Parameters #### Path Parameters - **key** (number) - Required - The Virtual-Key Code of the key to check. ``` -------------------------------- ### ReadByte Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Reads and returns the next byte from the message. ```APIDOC ## ReadByte() ### Description Reads and returns the next byte in the message as a number. ### Method `ReadByte()` ### Returns - `number`: The byte read from the message. ``` -------------------------------- ### OutlinedRect(x, y, w, h) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Draws an outlined rectangle on the screen. ```APIDOC ## OutlinedRect(x, y, w, h) ### Description Draws an outlined rectangle on the screen. ### Parameters - **x** (number) - The x-coordinate of the top-left corner. - **y** (number) - The y-coordinate of the top-left corner. - **w** (number) - The width of the rectangle. - **h** (number) - The height of the rectangle. ``` -------------------------------- ### IsValid Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Checks if the UserCmd entity is valid. This function is executed before any other. ```APIDOC ## IsValid() ### Description Checks if the UserCmd entity is valid. ### Returns - bool: True if the entity is valid, false otherwise. ``` -------------------------------- ### GetNumBitsLeft Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Returns the number of bits remaining to be read in the message. ```APIDOC ## GetNumBitsLeft() ### Description Returns the number of bits left in the message. ### Method `GetNumBitsLeft()` ### Returns - `number`: The number of bits remaining. ``` -------------------------------- ### Vec3 Fields Source: https://fedoraware.github.io/Docs/Lua/Classes/vec3 Describes the fields of the Vec3 class: x, y, and z coordinates. ```APIDOC ## Fields ### `x` X-coordinate. ### `y` Y-coordinate. ### `z` Z-coordinate. Might be 0 when the Vec3 object only contains 2D data. ``` -------------------------------- ### Entity Information Retrieval Source: https://fedoraware.github.io/Docs/Lua/Classes/entity Methods to retrieve various properties of the entity, such as index, origin, angles, class information, health, ammo, flags, and dormancy status. ```APIDOC ### `GetIndex()` Returns the index of the entity as a number. ### `GetOrigin()` Returns the origin location of the entity as a Vec3. ### `GetAngles()` Returns the absolute angles of the entity as a Vec3. ### `GetEyeAngles()` Returns the eye angles of the entity as a Vec3. ### `GetClassID()` Returns the class ID of the entity as a number. ### `GetClass()` Returns the class name of the entity as a string. ### `GetHealth()` Returns the health of the entity as a number. ### `GetAmmo()` Returns the ammo of the entity as a number. ### `GetFlags()` Returns the flags of the entity as a number. ### `GetEyePos()` Returns the eye position of the entity as a Vec3. ### `IsDormant()` If the entity is dormant. Returns a bool. ### `IsAlive()` If the entity is alive. Returns a bool. ### `GetTeam()` Returns the team of the entity as a number. ### `GetCriticals()` Returns the criticals of the entity. ``` -------------------------------- ### SetSendPacket Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets whether the packet associated with the user command should be sent or choked. Note that this setting might be overridden by other features. ```APIDOC ## SetSendPacket(state) ### Description Sets whether the packet should be sent or choked. ### Parameters #### Path Parameters - **state** (bool) - Required - The state to set for sending the packet (true to send, false to choke). ``` -------------------------------- ### GetAccountID Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the account ID (SteamID 3) of the player with the given index. ```APIDOC ## GetAccountID(index) ### Description Returns the account ID (SteamID 3) of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### GetByIndex Source: https://fedoraware.github.io/Docs/Lua/Helpers/entities Retrieves an entity by its unique index. ```APIDOC ## GetByIndex(index) ### Description Returns the entity with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The unique index of the entity to retrieve. ### Returns - BaseEntity: The entity corresponding to the provided index. ``` -------------------------------- ### IsInGame Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Checks if the player is currently in a game. Returns a boolean value. ```APIDOC ## IsInGame() ### Description Checks if the player is currently in a game. ### Returns - bool: True if the player is in a game, false otherwise. ``` -------------------------------- ### SetFont(fontIndex) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Sets the font to be used for subsequent text drawing operations. ```APIDOC ## SetFont(fontIndex) ### Description Sets the current font for all upcomming text functions. ### Parameters - **fontIndex** (number) - The index of the font to use. ``` -------------------------------- ### GetPriority(friendsId) Source: https://fedoraware.github.io/Docs/Lua/Helpers/fedoraware Retrieves the priority for a given friend ID. ```APIDOC ## GetPriority(friendsId) ### Description Returns the priority of the given friendsId (SteamID 3). ### Method Lua Function ### Endpoint N/A ### Parameters #### Path Parameters - **friendsId** (number) - Required - The SteamID 3 of the friend. ``` -------------------------------- ### GetPlayerForUserID Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Retrieves an entity index for a given user ID. ```APIDOC ## GetPlayerForUserID(userID) ### Description Returns an entity index from a user ID. ### Parameters #### Path Parameters - **userID** (number) - Required - The user ID to look up. ### Returns - number: The entity index associated with the user ID. ``` -------------------------------- ### GetScore Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the score of the player with the given index. ```APIDOC ## GetScore(index) ### Description Returns the score of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### SetSilentTime(bool) Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Sets whether the current tick should be silent. ```APIDOC ## SetSilentTime(bool silent) ### Description Sets whether the current tick should be silent. ### Parameters #### Path Parameters - **silent** (boolean) - Required - Determines if the tick should be silent. ``` -------------------------------- ### GetHealth Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the health of the player with the given index. ```APIDOC ## GetHealth(index) ### Description Returns the health of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### SetColor(r, g, b, a) Source: https://fedoraware.github.io/Docs/Lua/Interfaces/draw Sets the current drawing color for subsequent drawing operations. ```APIDOC ## SetColor(r, g, b, a) ### Description Sets the current color for all upcomming drawing functions. ### Parameters - **r** (number) - The red component of the color (0-255). - **g** (number) - The green component of the color (0-255). - **b** (number) - The blue component of the color (0-255). - **a** (number) - The alpha (transparency) component of the color (0-255). ``` -------------------------------- ### Entity State Modification Source: https://fedoraware.github.io/Docs/Lua/Classes/entity Methods to modify the entity's position and orientation. ```APIDOC ### `SetOrigin(origin)` Sets the origin of the entity. ### `SetAngles(angles)` Sets the angles of the entity. ### `SetEyeAngles(angles)` Sets the eye angles of the entity. ``` -------------------------------- ### IsTakingScreenshot Source: https://fedoraware.github.io/Docs/Lua/Interfaces/engine Checks if the player is currently taking a screenshot. Returns a boolean value. ```APIDOC ## IsTakingScreenshot() ### Description Checks if the player is taking a screenshot. ### Returns - bool: True if a screenshot is being taken, false otherwise. ``` -------------------------------- ### GetSideMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Retrieves the current side strafe movement value. ```APIDOC ## GetSideMove() ### Description Returns the current side strafe movement value. ### Returns - number: The side strafe movement amount. ``` -------------------------------- ### Unregister Callback Source: https://fedoraware.github.io/Docs/Lua/callbacks Unregisters a previously registered callback. ```APIDOC ## Unregister(type, name) ### Description This function removes a previously registered callback. You must provide the type of the event and the name used during registration. ### Parameters * **type** (string) - The type of the callback event that was registered. * **name** (string) - The unique identifier of the callback to unregister. ``` -------------------------------- ### Entity Validation Source: https://fedoraware.github.io/Docs/Lua/Classes/entity Checks if the entity is valid. This should be called before other functions to ensure the entity is still active. ```APIDOC ## Methods ### `IsValid()` If the entity is valid. Returns a bool. This runs before every other function. ``` -------------------------------- ### SetSideMove Source: https://fedoraware.github.io/Docs/Lua/Classes/usercmd Sets the side strafe movement value for the user command. ```APIDOC ## SetSideMove(move) ### Description Sets the side strafe movement for the user command. ### Parameters #### Path Parameters - **move** (number) - Required - The side strafe movement amount to set. ``` -------------------------------- ### ShiftedTicks() Source: https://fedoraware.github.io/Docs/Lua/Helpers/fedoraware Retrieves the number of ticks that have been shifted, often used for features like Double Tap. ```APIDOC ## ShiftedTicks() ### Description Returns how many ticks have been shifted (for Double Tap etc.). ### Method Lua Function ### Endpoint N/A ### Parameters None ### Response - **ticks** (number) - The number of shifted ticks. ``` -------------------------------- ### SilentTime() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns whether the current tick should be silent. ```APIDOC ## SilentTime() ### Description Returns whether the current tick should be silent. ### Returns - `boolean`: True if the tick should be silent, false otherwise. ``` -------------------------------- ### IntervalPerTick() Source: https://fedoraware.github.io/Docs/Lua/Helpers/global-info Returns the duration of a single tick in seconds. ```APIDOC ## IntervalPerTick() ### Description Returns the duration of a single tick in seconds. ### Returns - `number`: The interval per tick in seconds. ``` -------------------------------- ### ReadLong Source: https://fedoraware.github.io/Docs/Lua/Classes/user-message Reads and returns the next long integer from the message. ```APIDOC ## ReadLong() ### Description Reads and returns the next long in the message as a number. ### Method `ReadLong()` ### Returns - `number`: The long integer read from the message. ``` -------------------------------- ### GetMaxHealth Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the max health of the player with the given index. ```APIDOC ## GetMaxHealth(index) ### Description Returns the max health of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` -------------------------------- ### GetDeaths Source: https://fedoraware.github.io/Docs/Lua/Classes/player-resource Returns the deaths of the player with the given index. ```APIDOC ## GetDeaths(index) ### Description Returns the deaths of the player with the given index. ### Parameters #### Path Parameters - **index** (number) - Required - The index of the player. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.