Barebone start on lua > ts

This commit is contained in:
chip committed 2020-10-11 15:26:04 +02:00
1 parent e7f8043dd9
commit c6e8baac56
2 files changed
+8 -13

No files matched your search

+6 -6
View File
@@ -1,7 +1,7 @@
setImmediate(() => {
emitNet("helloserver");
});
let ESX = null;
onNet("helloclient", (message) => {
console.log(`The server replied: ${message}`);
});
setTick(() => {
while (ESX === null) {
emit('esx:getSharedObject', (obj) => ESX = obj);
}
});
+2 -7
View File
@@ -1,8 +1,3 @@
onNet("helloserver", () => {
const _source = (global as any).source;
let ESX = null;
const test = (x) => x;
console.log(`Hello from ${_source}`);
emitNet("helloclient", _source, "i got your message!");
});
emit('esx:getSharedObject', (obj) => ESX = obj);