### InitGame Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Initializes the game for a player, setting various game-related parameters and configurations. ```APIDOC ## InitGame ### Description This RPC initializes the game for a player, setting various game-related parameters and configurations. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **bZoneNames** (bool) - Required - Enable/disable zone names. - **bUseCJWalk** (bool) - Required - Enable/disable CJ walk. - **bAllowWeapons** (bool) - Required - Enable/disable weapons. - **bLimitGlobalChatRadius** (bool) - Required - Enable/disable limiting global chat radius. - **fGlobalChatRadius** (float) - Required - Global chat radius. - **bStuntBonus** (bool) - Required - Enable/disable stunt bonus. - **fNameTagDistance** (float) - Required - Name tag distance. - **bDisableEnterExits** (bool) - Required - Disable enter/exit points. - **bNameTagLOS** (bool) - Required - Enable/disable name tag line of sight. - **bManualVehEngineAndLights** (bool) - Required - Enable/disable manual vehicle engine and lights. - **dSpawnsAvailable** (UINT32) - Required - Number of spawns available. - **wPlayerID** (UINT16) - Required - Player ID. - **bShowNameTags** (bool) - Required - Show name tags. - **dShowPlayerMarkers** (UINT32) - Required - Show player markers. - **bWorldTime** (UINT8) - Required - World time. - **bWeather** (UINT8) - Required - Weather. - **fGravity** (float) - Required - Gravity. - **bLanMode** (bool) - Required - LAN mode. - **dDeathDropMoney** (UINT32) - Required - Death drop money. - **bInstagib** (bool) - Required - Instagib mode. - **dOnfootRate** (UINT32) - Required - On-foot rate. - **dInCarRate** (UINT32) - Required - In-car rate. - **dWeaponRate** (UINT32) - Required - Weapon rate. - **dMultiplier** (UINT32) - Required - Multiplier. - **dLagCompMode** (UINT32) - Required - Lag compensation mode. - **length** (UINT8) - Required - Hostname length. - **HostName** (char[]) - Required - Host name. - **bVehicleModels** (UINT8) - Required - Array of used vehicle models with size 212 (0 to 211). - **dVehicleFriendlyFire** (UINT32) - Required - Vehicle friendly fire. ### Request Example N/A ### Response N/A ``` -------------------------------- ### ServerJoin Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Handles the event when a player joins the server. Allows setting player ID, color, and name. ```APIDOC ## ServerJoin ### Description This RPC is called when a player joins the server. It allows the server to initialize the player's data. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **wPlayerID** (UINT16) - Required - Player ID. - **dColor** (UINT32) - Required - Player color. Setting to 0 will make random color on each client. - **isNPC** (UINT8) - Required - Indicates if the player is an NPC. - **PlayerNameLength** (UINT8) - Required - Length of the player's name. - **PlayerName** (char[]) - Required - Player's name. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Menus API Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Provides functionality to initialize, show, and hide menus for players. ```APIDOC ## InitMenu ### Description Initializes a menu with specified columns, title, and items. ### Method RPC ### Endpoint ID: 76 ### Parameters #### Path Parameters - **MenuID** (UINT8) - Required - The ID of the menu. - **bColumns** (UINT32) - Required - The number of columns in the menu. - **TitleLength** (UINT32) - Required - The length of the menu title. - **Title** (char[]) - Required - The title of the menu. - **PosX** (float) - Required - The X position of the menu. - **PosY** (float) - Required - The Y position of the menu. - **Col1Width** (float) - Required - The width of the first column. - **Col2Width** (float) - Optional - The width of the second column (if bColumns is true). - **bMenuEnabled** (UINT32) - Required - Whether the menu is enabled. - **bRowEnabled** (UINT32) - Required - An array indicating which rows are enabled. - **Col1HeaderLength** (UINT32) - Required - The length of the first column header. - **Col1Header** (char[]) - Required - The header text for the first column. - **Col1Count** (UINT8) - Required - The number of items in the first column. - **Col1ItemsLength** (UINT32) - Required - The total length of items in the first column. - **Col1Items** (char[]) - Required - The text for items in the first column. - **Col2HeaderLength** (UINT32) - Optional - The length of the second column header (if bColumns is true). - **Col2Header** (char[]) - Optional - The header text for the second column (if bColumns is true). - **Col2Count** (UINT8) - Optional - The number of items in the second column (if bColumns is true). - **Col2ItemsLength** (UINT32) - Optional - The total length of items in the second column (if bColumns is true). - **Col2Items** (char[]) - Optional - The text for items in the second column (if bColumns is true). ### Additional Information - bRowEnabled is an array of interactive rows with size 12 (0 to 11). - Col1Items is an array of items text with size Col1Count. Col2Items is an array of items text with size Col2Count. - If bColumns is false, it means that Col2Width, Col2Header, Col2Count and Col2Items should be skipped. ### Response #### Success Response (200) N/A ## ShowMenu ### Description Shows an initialized menu to players. ### Method RPC ### Endpoint ID: 77 ### Parameters #### Path Parameters - **MenuID** (UINT8) - Required - The ID of the menu to show. ### Response #### Success Response (200) N/A ## HideMenu ### Description Hides a specified menu from players. ### Method RPC ### Endpoint ID: 78 ### Parameters #### Path Parameters - **MenuID** (UINT8) - Required - The ID of the menu to hide. ### Response #### Success Response (200) N/A ``` -------------------------------- ### SetPlayerTeam Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the team for a player. ```APIDOC ## SetPlayerTeam ### Description Sets the team for a player. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **wPlayerID** (UINT16) - Required - Player ID. - **bTeamID** (UINT8) - Required - Team ID. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Initialize Game with C Structures Source: https://context7.com/brunoo16/samp-packet-list/llms.txt Defines the C structure for the InitGame RPC, used by the server to initialize the client with various server settings. This includes options for zone names, weapons, chat radius, gravity, and more. ```c // InitGame - ID: 139 // Server sends this to initialize client with server settings typedef struct { bool bZoneNames; bool bUseCJWalk; bool bAllowWeapons; bool bLimitGlobalChatRadius; float fGlobalChatRadius; bool bStuntBonus; float fNameTagDistance; bool bDisableEnterExits; bool bNameTagLOS; bool bManualVehEngineAndLights; UINT32 dSpawnsAvailable; UINT16 wPlayerID; bool bShowNameTags; UINT32 dShowPlayerMarkers; UINT8 bWorldTime; UINT8 bWeather; float fGravity; bool bLanMode; UINT32 dDeathDropMoney; bool bInstagib; UINT32 dOnfootRate; UINT32 dInCarRate; UINT32 dWeaponRate; UINT32 dMultiplier; UINT32 dLagCompMode; UINT8 length; char HostName[length]; UINT8 bVehicleModels[212]; // Used vehicle models UINT32 dVehicleFriendlyFire; } InitGameRPC; ``` -------------------------------- ### ServerQuit Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Handles the event when a player quits the server. Provides the reason for the player's disconnection. ```APIDOC ## ServerQuit ### Description This RPC is called when a player quits the server. It provides the reason for the player's disconnection. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **wPlayerID** (UINT16) - Required - Player ID. - **reason** (UINT8) - Required - Reason for quitting: 0 = Timeout, 1 = Quit, 2 = Kick/Ban. ### Request Example N/A ### Response N/A ``` -------------------------------- ### ToggleCameraTarget - ID: 170 Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List No description -------------------------------- ### Player and Game State Management Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Functions to manage player spawning, game time, messages, and player states. ```APIDOC ## WorldPlayerAdd ### Description Adds a player to the game world. ### Method RPC ### Endpoint /WorldPlayerAdd ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **wPlayerID** (UINT16) - Required - The ID of the player to add. - **team** (UINT8) - Required - The team the player belongs to. - **dSkinId** (UINT32) - Required - The skin ID for the player. - **PosX** (float) - Required - The initial X position. - **PosY** (float) - Required - The initial Y position. - **PosZ** (float) - Required - The initial Z position. - **facing_angle** (float) - Required - The initial facing angle. - **player_color** (UINT32) - Required - The color of the player. - **fighting_style** (UINT8) - Required - The fighting style of the player. - **wSkillLevel** (array of UINT16) - Required - An array of 11 weapon skill levels (0-10). ### Request Example ```json { "wPlayerID": 0, "team": 1, "dSkinId": 1, "PosX": 0.0, "PosY": 0.0, "PosZ": 3.0, "facing_angle": 0.0, "player_color": 4278190080, "fighting_style": 4, "wSkillLevel": [0,0,0,0,0,0,0,0,0,0,0] } ``` ### Response #### Success Response (200) None #### Response Example None ## WorldPlayerRemove ### Description Removes a player from the game world. ### Method RPC ### Endpoint /WorldPlayerRemove ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **wPlayerID** (UINT16) - Required - The ID of the player to remove. ### Request Example ```json { "wPlayerID": 0 } ``` ### Response #### Success Response (200) None #### Response Example None ## SendGameTimeUpdate ### Description Updates the game time. ### Method RPC ### Endpoint /SendGameTimeUpdate ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **time** (INT32) - Required - The new game time. ### Request Example ```json { "time": 12 } ``` ### Response #### Success Response (200) None #### Response Example None ## SendClientMessage ### Description Sends a message to the client. ### Method RPC ### Endpoint /SendClientMessage ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **dColor** (UINT32) - Required - The color of the message. - **dMessageLength** (UINT32) - Required - The length of the message. - **Message** (char[]) - Required - The message content. ### Request Example ```json { "dColor": 4278190080, "dMessageLength": 11, "Message": "Hello World" } ``` ### Response #### Success Response (200) None #### Response Example None ## SetPlayerDrunkLevel ### Description Sets the drunk level of a player. ### Method RPC ### Endpoint /SetPlayerDrunkLevel ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **iDrunkLevel** (INT32) - Required - The drunk level to set. ### Request Example ```json { "iDrunkLevel": 5 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetPlayerColor ### Description Sets the color of a player. ### Method RPC ### Endpoint /SetPlayerColor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **wPlayerID** (UINT16) - Required - The ID of the player. - **dColor** (UINT32) - Required - The color to set. ### Request Example ```json { "wPlayerID": 0, "dColor": 4278190080 } ``` ### Response #### Success Response (200) None #### Response Example None ## ForceClassSelection ### Description Forces the player to select a class. ### Method RPC ### Endpoint /ForceClassSelection ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) None #### Response Example None ## ToggleWidescreen ### Description Toggles widescreen mode. ### Method RPC ### Endpoint /ToggleWidescreen ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **enable** (UINT8) - Required - 1 to enable, 0 to disable. ### Request Example ```json { "enable": 1 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetPlayerWantedLevel ### Description Sets the player's wanted level. ### Method RPC ### Endpoint /SetPlayerWantedLevel ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **bWantedLevel** (UINT8) - Required - The wanted level to set. ### Request Example ```json { "bWantedLevel": 2 } ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Spawn Information Management Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Functions related to setting and requesting player spawn information. ```APIDOC ## SetSpawnInfo ### Description Sets the spawn information for a player. ### Method RPC ### Endpoint /SetSpawnInfo ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **byteTeam** (UINT8) - Required - The team ID. - **dSkin** (UINT32) - Required - The player skin ID. - **unused** (UINT8) - Required - Unused parameter. - **X** (float) - Required - Spawn X coordinate. - **Y** (float) - Required - Spawn Y coordinate. - **Z** (float) - Required - Spawn Z coordinate. - **fRotation** (float) - Required - Spawn facing rotation. - **dSpawnWeapons1** (UINT32) - Required - First spawn weapon ID. - **dSpawnWeapons2** (UINT32) - Required - Second spawn weapon ID. - **dSpawnWeapons3** (UINT32) - Required - Third spawn weapon ID. - **dSpawnWeaponsAmmo1** (UINT32) - Required - Ammo for the first spawn weapon. - **dSpawnWeaponsAmmo2** (UINT32) - Required - Ammo for the second spawn weapon. - **dSpawnWeaponsAmmo3** (UINT32) - Required - Ammo for the third spawn weapon. ### Request Example ```json { "byteTeam": 1, "dSkin": 1, "unused": 0, "X": 0.0, "Y": 0.0, "Z": 3.0, "fRotation": 0.0, "dSpawnWeapons1": 24, "dSpawnWeapons2": 0, "dSpawnWeapons3": 0, "dSpawnWeaponsAmmo1": 100, "dSpawnWeaponsAmmo2": 0, "dSpawnWeaponsAmmo3": 0 } ``` ### Response #### Success Response (200) None #### Response Example None ## RequestClass ### Description Requests a player class with specified spawn information. ### Method RPC ### Endpoint /RequestClass ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **bRequestResponse** (UINT8) - Required - Response code (0 for invalid, otherwise data follows). - **byteTeam** (UINT8) - Required - The team ID. - **dSkin** (UINT32) - Required - The player skin ID. - **unused** (UINT8) - Required - Unused parameter. - **X** (float) - Required - Spawn X coordinate. - **Y** (float) - Required - Spawn Y coordinate. - **Z** (float) - Required - Spawn Z coordinate. - **fRotation** (float) - Required - Spawn facing rotation. - **dSpawnWeapons1** (UINT32) - Required - First spawn weapon ID. - **dSpawnWeapons2** (UINT32) - Required - Second spawn weapon ID. - **dSpawnWeapons3** (UINT32) - Required - Third spawn weapon ID. - **dSpawnWeaponsAmmo1** (UINT32) - Required - Ammo for the first spawn weapon. - **dSpawnWeaponsAmmo2** (UINT32) - Required - Ammo for the second spawn weapon. - **dSpawnWeaponsAmmo3** (UINT32) - Required - Ammo for the third spawn weapon. ### Request Example ```json { "bRequestResponse": 1, "byteTeam": 1, "dSkin": 1, "unused": 0, "X": 0.0, "Y": 0.0, "Z": 3.0, "fRotation": 0.0, "dSpawnWeapons1": 24, "dSpawnWeapons2": 0, "dSpawnWeapons3": 0, "dSpawnWeaponsAmmo1": 100, "dSpawnWeaponsAmmo2": 0, "dSpawnWeaponsAmmo3": 0 } ``` ### Response #### Success Response (200) None #### Response Example None ## RequestSpawn ### Description Requests to spawn a player. ### Method RPC ### Endpoint /RequestSpawn ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **bRequestResponse** (UINT8) - Required - 0 if spawn request declined, otherwise accepted. ### Request Example ```json { "bRequestResponse": 1 } ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Pickup Management API Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Endpoints for creating and destroying pickups. ```APIDOC ## CreatePickup ### Description Creates a pickup with a specified ID, model, spawn type, and position. ### Method POST ### Endpoint /pickups/create ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **iPickupID** (INT32) - Required - The unique ID for the pickup. - **iModelID** (INT32) - Required - The model ID of the pickup. - **iSpawnType** (INT32) - Required - The spawn type for the pickup. - **x** (float) - Required - The X coordinate of the pickup's position. - **y** (float) - Required - The Y coordinate of the pickup's position. - **z** (float) - Required - The Z coordinate of the pickup's position. ### Request Example ```json { "iPickupID": 1, "iModelID": 1234, "iSpawnType": 1, "x": 0.0, "y": 0.0, "z": 3.0 } ``` ### Response #### Success Response (200) - **success** (bool) - Indicates if the pickup creation was successful. #### Response Example ```json { "success": true } ``` ## DestroyPickup ### Description Destroys an existing pickup. ### Method DELETE ### Endpoint /pickups/{iPickupID} ### Parameters #### Path Parameters - **iPickupID** (INT32) - Required - The ID of the pickup to destroy. #### Query Parameters None #### Request Body None ### Request Example (No request body) ### Response #### Success Response (200) - **success** (bool) - Indicates if the pickup was destroyed successfully. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Create3DTextLabel - ID: 36 Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List This RPC creates a 3D text label in the world. ```APIDOC ## Create3DTextLabel - ID: 36 ### Description This RPC creates a 3D text label in the world. ### Method N/A (RPC) ### Endpoint N/A ### Parameters #### Path Parameters - **wLabelID** (UINT16) - Required - Label ID - **color** (UINT32) - Required - Text color - **x** (float) - Required - X coordinate - **y** (float) - Required - Y coordinate - **z** (float) - Required - Z coordinate - **DrawDistance** (float) - Required - Draw distance - **testLOS** (UINT8) - Required - Test line of sight - **attachedPlayer** (UINT16) - Required - Attached player ID - **attachedVehicle** (UINT16) - Required - Attached vehicle ID - **text** (CSTRING) - Required - Text content ### Request Example { "wLabelID": 1, "color": 0xFFFFFFFF, "x": 100.0, "y": 200.0, "z": 50.0, "DrawDistance": 50.0, "testLOS": 1, "attachedPlayer": 0, "attachedVehicle": 0, "text": "Hello, world!" } ### Response #### Success Response (200) - No specific response #### Response Example { "status": "success" } ``` -------------------------------- ### ApplyPlayerAnimation Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Applies an animation to a player. ```APIDOC ## ApplyPlayerAnimation ### Description Applies an animation to a player. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **wPlayerID** (UINT16) - Required - Player ID. - **AnimLibLength** (UINT8) - Required - Animation library length. - **AnimLib** (char[]) - Required - Animation library. - **AnimNameLength** (UINT8) - Required - Animation name length. - **AnimName** (char[]) - Required - Animation name. - **fDelta** (float) - Required - Delta. - **loop** (bool) - Required - Loop. - **lockx** (bool) - Required - Lock X. - **locky** (bool) - Required - Lock Y. - **freeze** (bool) - Required - Freeze. - **dTime** (UINT32) - Required - Time. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Gravity API Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the global gravity for all players. ```APIDOC ## SetGravity ### Description Sets the global gravity value for all players. ### Method RPC ### Endpoint ID: 146 ### Parameters #### Path Parameters - **gravity** (float) - Required - The gravity value to set. ### Response #### Success Response (200) N/A ``` -------------------------------- ### ToggleClock Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Toggles the in-game clock. ```APIDOC ## ToggleClock ### Description Toggles the in-game clock. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **toggle** (UINT8) - Required - 1 to enable, 0 to disable. ### Request Example N/A ### Response N/A ``` -------------------------------- ### SetPlayerSkin Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the skin of a player. ```APIDOC ## SetPlayerSkin ### Description Sets the skin of a player. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **wPlayerID** (UINT32) - Required - Player ID. - **dSkinID** (UINT32) - Required - Skin ID. ### Request Example N/A ### Response N/A ``` -------------------------------- ### PutPlayerInVehicle - ID: 70 Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List This RPC places a player into a vehicle, specifying the vehicle and seat. ```APIDOC ## PutPlayerInVehicle - ID: 70 ### Description This RPC places a player into a vehicle. ### Method N/A (RPC) ### Endpoint N/A ### Parameters #### Path Parameters - **wVehicleID** (UINT16) - Required - Vehicle ID - **bSeatID** (UINT8) - Required - Seat ID ### Request Example { "wVehicleID": 123, "bSeatID": 0 } ### Response #### Success Response (200) - No specific response #### Response Example { "status": "success" } ``` -------------------------------- ### SetWeather Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the weather for a player. ```APIDOC ## SetWeather ### Description Sets the weather for a player. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **bWeatherID** (UINT8) - Required - Weather ID. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Object Management RPCs in C Source: https://context7.com/brunoo16/samp-packet-list/llms.txt Details structures for object manipulation RPCs, including creation, destruction, movement, and attachment to players. These are crucial for dynamic world object management. ```c // CreateObject - ID: 44 typedef struct { UINT16 wObjectID; UINT32 ModelID; float x, y, z; float rotx, roty, rotz; float DrawDistance; UINT8 NoCameraCol; UINT16 attachedObject; // -1 if not attached UINT16 attachedVehicle; // -1 if not attached float AttachOffsetX, AttachOffsetY, AttachOffsetZ; float AttachRotX, AttachRotY, AttachRotZ; UINT8 SyncRotation; } CreateObjectRPC; // DestroyObject - ID: 47 typedef struct { UINT16 wObjectID; } DestroyObjectRPC; // MoveObject - ID: 99 typedef struct { UINT16 wObjectID; float x, y, z; // Current position float target_X, target_Y, target_Z; // Target position float speed; float target_rX, target_rY, target_rZ; // Target rotation } MoveObjectRPC; // SetPlayerAttachedObject - ID: 113 // Attach/detach objects to player body parts typedef struct { UINT16 playerid; UINT32 Index; // Attachment slot (0-9) bool create; // true = attach, false = detach UINT32 Model; // Object model ID UINT32 bone; // Body part to attach to float fOffsetX, fOffsetY, fOffsetZ; float fRotX, fRotY, fRotZ; float fScaleX, fScaleY, fScaleZ; UINT32 materialcolor1, materialcolor2; } SetPlayerAttachedObjectRPC; ``` -------------------------------- ### SetPlayerTime Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the time for a player. ```APIDOC ## SetPlayerTime ### Description Sets the time for a player. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **bHour** (UINT8) - Required - Hour. - **bMinute** (UINT8) - Required - Minute. ### Request Example N/A ### Response N/A ``` -------------------------------- ### SetWorldBounds Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Sets the world bounds. ```APIDOC ## SetWorldBounds ### Description Sets the world bounds. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **max_x** (float) - Required - Maximum X coordinate. - **min_x** (float) - Required - Minimum X coordinate. - **max_y** (float) - Required - Maximum Y coordinate. - **min_y** (float) - Required - Minimum Y coordinate. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Player and Weapon Management Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Functions to manage player health, armor, weapons, and fighting styles. ```APIDOC ## SetPlayerHealth ### Description Sets the health of a player. ### Method RPC ### Endpoint /SetPlayerHealth ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **health** (float) - Required - The health value to set. ### Request Example ```json { "health": 100.0 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetPlayerArmour ### Description Sets the armor of a player. ### Method RPC ### Endpoint /SetPlayerArmour ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **armour** (float) - Required - The armor value to set. ### Request Example ```json { "armour": 50.0 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetWeaponAmmo ### Description Sets the ammunition for a specific weapon. ### Method RPC ### Endpoint /SetWeaponAmmo ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **bWeaponID** (UINT8) - Required - The ID of the weapon. - **wAmmo** (UINT16) - Required - The amount of ammunition to set. ### Request Example ```json { "bWeaponID": 24, "wAmmo": 100 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetArmedWeapon ### Description Sets the armed weapon for a player. ### Method RPC ### Endpoint /SetArmedWeapon ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **dWeaponID** (UINT32) - Required - The ID of the weapon to arm. ### Request Example ```json { "dWeaponID": 24 } ``` ### Response #### Success Response (200) None #### Response Example None ## SetPlayerFightingStyle ### Description Sets the fighting style for a player. ### Method RPC ### Endpoint /SetPlayerFightingStyle ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **wPlayerID** (UINT16) - Required - The ID of the player. - **fightstyle** (UINT8) - Required - The fighting style to set. ### Request Example ```json { "wPlayerID": 0, "fightstyle": 4 } ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### ClientCheck Source: https://github.com/brunoo16/samp-packet-list/wiki/RPC-List Performs a client-side check with specified parameters. ```APIDOC ## ClientCheck ### Description Performs a client-side check with specified parameters. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **type** (UINT8) - Required - Check type. - **address** (UINT32) - Required - Address. - **offset** (UINT16) - Required - Offset. - **count** (UINT16) - Required - Count. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Client Connection Source: https://context7.com/brunoo16/samp-packet-list/llms.txt Structures for handling client connection events, including initial join requests and NPC joins. ```APIDOC ## Client Connection ### ClientJoin **ID**: 25 **Description**: Represents a client joining the game server. ### NPCJoin **ID**: 54 **Description**: Represents an NPC joining the game server. ``` -------------------------------- ### Incoming Packets Source: https://github.com/brunoo16/samp-packet-list/wiki/Internal-Packet-List Details of packets received by the RakNet layer. ```APIDOC ## Incoming Packets ### ID_INTERNAL_PING #### Description Sent to check the latency of a connection. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (6). - **send_ping_time** (UINT32) - Required - The timestamp when the ping was sent. ### Request Example ```json { "Packet_ID": 6, "send_ping_time": 1678886400 } ``` ### Response #### Success Response (200) This packet is typically sent, not received with a specific response. #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_CONNECTED_PONG #### Description Response to an ID_INTERNAL_PING, indicating the server is reachable and providing round-trip time information. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (9). - **send_ping_time** (UINT32) - Required - The timestamp when the original ping was sent. - **send_pong_time** (UINT32) - Required - The timestamp when the pong response was sent. ### Request Example ```json { "Packet_ID": 9, "send_ping_time": 1678886400, "send_pong_time": 1678886401 } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_REQUEST_STATIC_DATA #### Description Requests static data from the server, often used during initial connection setup. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (10). ### Request Example ```json { "Packet_ID": 10 } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_CONNECTION_REQUEST #### Description Initiates a connection request from a client to the server, potentially including a password. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (11). - **password** (char[]) - Optional - The password for authentication, if required. ### Request Example ```json { "Packet_ID": 11, "password": "mysecretpassword" } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_AUTH_KEY #### Description Transmits an authentication key, likely used for secure communication or session validation. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (12). - **key_length** (UINT8) - Required - The length of the authentication key. - **key** (char[]) - Required - The authentication key itself. ### Request Example ```json { "Packet_ID": 12, "key_length": 16, "key": "a1b2c3d4e5f67890" } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_RPC_MAPPING #### Description Establishes or updates a mapping for Remote Procedure Calls (RPCs). ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (17). - **index** (UINT8) - Required - The index associated with the RPC mapping. ### Request Example ```json { "Packet_ID": 17, "index": 5 } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_DETECT_LOST_CONNECTIONS #### Description Triggers a mechanism to detect and handle lost connections. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (23). ### Request Example ```json { "Packet_ID": 23 } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` ```APIDOC ## Incoming Packets ### ID_NEW_INCOMING_CONNECTION #### Description Notifies that a new client has successfully connected to the server. ### Method N/A (Internal Packet) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Packet_ID** (UINT8) - Required - The identifier for this packet type (30). - **binary_address** (UINT32) - Required - The binary IP address of the new connection. - **port** (UINT16) - Required - The port number of the new connection. ### Request Example ```json { "Packet_ID": 30, "binary_address": 3232235777, "port": 12345 } ``` ### Response #### Success Response (200) N/A #### Response Example N/A ```