mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Feat(Sellout:Client): Client functionality
This commit is contained in:
1 parent
cf6c973708
commit
12c3646d74
1 file changed
+21
@@ -0,0 +1,21 @@
|
|||||||
|
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({
|
||||||
|
app: "SELLOUT",
|
||||||
|
method: "setListings",
|
||||||
|
data: listing
|
||||||
|
})
|
||||||
|
)
|
||||||
|
})
|
||||||
Reference in new issue
Block a user