ReferenceRakNet

RakNetPacket.ItemId

Reads second packet byte, or zero when the byte is absent. Its meaning depends on the actual protocol.

Syntax

packet.ItemId: number

Returns

TypeDescription
numberSecond packet byte, or zero when the byte is absent. Its meaning depends on the actual protocol.

Description

Packet metadata properties are read-only. Read the value inside the hook, and retain a byte copy when you need data afterward. Direct assignment to a packet property raises an error.

Example

local function inspect(packet)
    local value = packet.ItemId
    print(value)
end
raknet.addsendhook(inspect)
task.delay(5, function() raknet.removesendhook(inspect) end)

These are Game executor contracts. Check build requirements and session lifetimes before using them.