mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 06:28:51 +00:00
21 lines
511 B
TypeScript
21 lines
511 B
TypeScript
import { ESX } from '../client/client';
|
|
import events from '../utils/events';
|
|
|
|
|
|
onNet(events.CONTACTS_SEND_CONTACTS, (contacts: any) => {
|
|
SendNuiMessage(
|
|
JSON.stringify({
|
|
app: 'CONTACTS',
|
|
method: 'setContacts',
|
|
data: contacts
|
|
})
|
|
)
|
|
})
|
|
|
|
RegisterNuiCallbackType(events.CONTACTS_ADD_CONTACT_NUI);
|
|
on(`__cfx_nui:${events.CONTACTS_ADD_CONTACT_NUI}`, (data: any) => {
|
|
const display = data.name;
|
|
const number = data.number;
|
|
emitNet(events.CONTACTS_ADD_CONTACT, display, number);
|
|
});
|