Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data converter to packet
#1
Hi. There you have a converter which can change data to string to sending with packets.
http://pastebin.com/nNc8ar1s

Copy to client-side and server-side

Types supported:
  • Integer
  • Float
  • Boolean
  • String
  • Table
  • Array
  • Instance (if have method toPacket() which return table)

When you send packet, use function:
Code:
convertToPacket(data)

And when you get packet, use function:
Code:
receiveFromPacket(packetData)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)