-
Notifications
You must be signed in to change notification settings - Fork 1
Streams
AroliSG edited this page May 17, 2021
·
6 revisions
Creating a stream and sending it to a player:
const stream = new VCMPStream();
stream.writeString("lalaya");
stream.writeFloat(5.9);
stream.writeInt(51);
stream.writeByte(3);
stream.send(player);Reading a stream sent from the client:
function onClientScriptData(player, stream) {
let str = stream.readString();
let flt = stream.readFloat();
let int = stream.readInt();
let byte = stream.readByte();
}