Fixes conflict of directly sending byte array mvalue and raw emit (which uses byte array mvalue under the hood) by changing order of header and magic bytes
import alt from 'alt-server'
alt.on('test', (data) => {
alt.log({ data })
})
// fails at deserialization
// [Error] [V8] Exception: Error: Unable to deserialize cloned data due to invalid or unsupported version.
alt.emit('test', new Uint8Array([1, 2, 3, 4, 5]).buffer)
// works
alt.emitRaw('test', [1, 2, 3])
Fixes conflict of directly sending byte array mvalue and raw emit (which uses byte array mvalue under the hood) by changing order of header and magic bytes