feat(Marketplace): minor alerts

This commit is contained in:
Christopher committed 2021-02-19 18:26:53 +01:00
1 parent 283832f17e
commit 5244ff3a57
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
})
)
})