pub const INFORMATION_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x69, // Opcode: "i" 0x01, // Password: true 0x02, 0x00, // Players: 2 0x64, 0x00, // Max players: 100 0x07, 0x00, 0x00, 0x00, // Hostname length: 7 0x54, 0x65, 0x73, 0x74, 0x69, 0x6E, 0x67, // Hostname: "Testing" 0x04, 0x00, 0x00, 0x00, // Gamemode length: 4 0x54, 0x45, 0x53, 0x54, // Gamemode: "TEST" 0x02, 0x00, 0x00, 0x00, // Language length: 2 0x45, 0x4E, // Language: "EN" ]; pub const RULE_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x72, // Opcode: "r" 0x03, 0x00, // Rule count: 3 // Rule 1 0x04, // Rule name length: 4 0x54, 0x45, 0x53, 0x54, // Rule name: "TEST" 0x02, // Rule value length: 2 0x4F, 0x4E, // Rule value: "ON" // Rule 2 0x05, // Rule name length: 5 0x54, 0x45, 0x53, 0x54, 0x32, // Rule name: "TEST2" 0x03, // Rule value length: 3 0x4F, 0x46, 0x46, // Rule value: "OFF" // Rule 3 0x05, // Rule name length: 5 0x54, 0x45, 0x53, 0x54, 0x33, // Rule name: "TEST3" 0x03, // Rule value length: 3 0x59, 0x45, 0x53, // Rule value: "YES" ]; pub const CLIENT_LIST_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x63, // Opcode: "c" 0x02, 0x00, 0x00, 0x02, // Player count: 2 // Player 1 0x04, 0x00, 0x00, 0x00, // Nickname length: 4 0x4A, 0x6F, 0x68, 0x6E, // Nickname: "John" 0x05, 0x00, 0x00, 0x00, // Score: 5 // Player 2 0x03, 0x00, 0x00, 0x00, // Nickname length: 3 0x42, 0x6F, 0x62, // Nickname: "Bob" 0x07, 0x00, 0x00, 0x00, // Score: 7 ]; pub const DETAILED_PLAYER_INFORMATION_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x64, // Opcode: "d" 0x02, 0x00, // Player count: 2 // Player 1 0x01, // ID: 1 0x04, 0x00, 0x00, 0x00, // Nickname length: 4 0x4A, 0x6F, 0x68, 0x6E, // Nickname: "John" 0x05, 0x00, 0x00, 0x00, // Score: 5 0x64, 0x00, 0x00, 0x00, // Ping: 100 // Player 2 0x02, // ID: 2 0x03, 0x00, 0x00, 0x00, // Nickname length: 3 0x42, 0x6F, 0x62, // Nickname: "Bob" 0x07, 0x00, 0x00, 0x00, // Score: 7 0x32, 0x00, 0x00, 0x00, // Ping: 50 ]; pub const IS_OPEN_MULTIPLAYER_SERVER_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x69, // Opcode: "o" 0x01, // Is open multiplayer server: true (1) ]; pub const PING_PACKET: &[u8] = &[ 0x53, 0x41, 0x4D, 0x50, // "SAMP" 0x7F, 0x00, 0x00, 0x01, // IP address: 127.0.0.1 0x1F, 0x90, // Port: 7777 0x70, // Opcode: "p" 0x12, 0x34, 0x56, 0x78, // data: 0x12345678 ];