mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(calling/client|nui): new command and changed event name
This commit is contained in:
1 parent
88d1cb89fd
commit
085fb778f1
2 files changed
+15
-1
No files matched your search
@@ -51,7 +51,7 @@ export const ContactList = () => {
|
|||||||
};
|
};
|
||||||
const startCall = (number) => {
|
const startCall = (number) => {
|
||||||
console.log(number);
|
console.log(number);
|
||||||
Nui.send('phone:startCall', {
|
Nui.send('phone:beginCall', {
|
||||||
number,
|
number,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,20 @@ import events from '../utils/events';
|
|||||||
|
|
||||||
const exp = (global as any).exports;
|
const exp = (global as any).exports;
|
||||||
|
|
||||||
|
RegisterCommand('call', (source: number, args: string[], raw: any) => {
|
||||||
|
emitNet(events.PHONE_BEGIN_CALL, args[0])
|
||||||
|
}, false)
|
||||||
|
|
||||||
|
|
||||||
|
setImmediate(() => {
|
||||||
|
emit('chat:addSuggestion', '/call', 'Call a player', [
|
||||||
|
{
|
||||||
|
name: 'Phone Number',
|
||||||
|
help: 'The phone number to call'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
})
|
||||||
|
|
||||||
RegisterNuiCallbackType(events.PHONE_BEGIN_CALL);
|
RegisterNuiCallbackType(events.PHONE_BEGIN_CALL);
|
||||||
on(`__cfx_nui:${events.PHONE_BEGIN_CALL}`, (data: any) => {
|
on(`__cfx_nui:${events.PHONE_BEGIN_CALL}`, (data: any) => {
|
||||||
emitNet(events.PHONE_BEGIN_CALL, data.number)
|
emitNet(events.PHONE_BEGIN_CALL, data.number)
|
||||||
|
|||||||
Reference in new issue
Block a user