Skip to content
DizzasTeR edited this page Apr 19, 2021 · 4 revisions

Stream


Class Static Functions

  • None

Constructor(s)

Stream:new()

Methods

  • readByte() — Read data as bytes

  • readNumber() — Read data as integers/numbers

  • readFloat() — Read data as decimal/number

  • readString() — Read data as text

  • writeByte(uint8_t data) — Write bytes into data stream

  • writeNumber(int data) — Write integer/number into data stream

  • writeFloat(float data) — Write a decimal into data stream

  • writeString(string data) — Write text into data stream

  • send(Player player / nil) — Send the stream to the player or all players if player is nil

  • clear() — Clear all the data stream

Read-Only Methods

  • None

Properties

  • None

General Example

local stream = Stream:new()
stream:writeString("Hello!")
stream:writeNumber(10)
stream:writeFloat(3.14)
stream:send()
Clone this wiki locally