feat(Marketplace): minor alerts

This commit is contained in:
Christopher committed 2021-02-19 16:19:55 +01:00
1 parent 9846a4e1ae
commit 6d2961ac71
5 files changed
+33 -4

No files matched your search

+12 -2
View File
@@ -12,11 +12,21 @@ onNet(events.SELLOUT_SEND_LISTING, (listing: any) => {
RegisterNuiCallbackType(events.SELLOUT_ADD_LISTING);
on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: any) => {
const listing = data;
emitNet(events.SELLOUT_ADD_LISTING, listing);
emitNet(events.SELLOUT_ADD_LISTING, data);
setTimeout(() => {
emitNet(events.SELLOUT_FETCH_LISTING);
console.log('Fetched');
}, 500);
});
onNet(events.SELLOUT_ACTION_RESULT, (alert: { message: string, type: string }) => {
SendNuiMessage(
JSON.stringify({
app: "SELLOUT",
method: "setAlert",
data: alert
})
)
})