10-25-2015, 01:48 AM
This piece of code should work:
--- Returns the string prefixed with its length, as used in the BungeeCord protocol local function writeProtocolString(a_Str) local len = a_Str:len() return string.char(math.floor(len / 256), math.floor(len % 256)) .. a_Str end -- usage: client:SendPluginMessage("BungeeCord", writeProtocolString("Connect") .. writeProtocolString("SomeServer"))