mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
fix(sellout:client:server): fixed how stuff gets sent and fetched.
This commit is contained in:
1 parent
98176bf5f3
commit
fbb9ab2ae8
2 files changed
+45
-33
No files matched your search
@@ -1,15 +1,5 @@
|
||||
import events from '../utils/events';
|
||||
|
||||
RegisterNuiCallbackType(events.SELLOUT_ADD_LISTING);
|
||||
on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: any) => {
|
||||
emitNet(events.SELLOUT_ADD_LISTING, data)
|
||||
|
||||
setTimeout(() => {
|
||||
emitNet(events.SELLOUT_FETCH_LISTING);
|
||||
console.log("Fetched")
|
||||
}, 500)
|
||||
})
|
||||
|
||||
onNet(events.SELLOUT_SEND_LISTING, (listing: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
@@ -18,4 +8,16 @@ onNet(events.SELLOUT_SEND_LISTING, (listing: any) => {
|
||||
data: listing
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
RegisterNuiCallbackType(events.SELLOUT_ADD_LISTING);
|
||||
on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: any) => {
|
||||
const listing = data;
|
||||
emitNet(events.SELLOUT_ADD_LISTING, listing)
|
||||
|
||||
setTimeout(() => {
|
||||
emitNet(events.SELLOUT_FETCH_LISTING);
|
||||
console.log("Fetched")
|
||||
}, 500)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user