Attempting to get Bungeecord Teleportation Functional
#12
How about a simple string.format with %c?
--- 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.format("%c%c%s", math.floor(len / 256), math.floor(len % 256), a_Str)
end

-- usage:
client:SendPluginMessage("BungeeCord", writeProtocolString("Connect") .. writeProtocolString("SomeServer"))
Reply
Thanks given by: NiLSPACE


Messages In This Thread
RE: Attempting to get Bungeecord Teleportation Functional - by xoft - 10-22-2015, 05:31 PM



Users browsing this thread: 5 Guest(s)