mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 06:28:51 +00:00
Prettified Code!
This commit is contained in:
1 parent
4a193776ec
commit
6cfc9ec19c
1 file changed
+26
-19
+26
-19
@@ -1,29 +1,36 @@
|
||||
import { ESX } from './client';
|
||||
import events from '../utils/events';
|
||||
import { ESX } from "./client";
|
||||
import events from "../utils/events";
|
||||
|
||||
const exp = (global as any).exports;
|
||||
|
||||
RegisterCommand('call', (source: number, args: string[], raw: any) => {
|
||||
emitNet(events.PHONE_BEGIN_CALL, args[0])
|
||||
}, false)
|
||||
|
||||
RegisterCommand(
|
||||
"call",
|
||||
(source: number, args: string[], raw: any) => {
|
||||
emitNet(events.PHONE_BEGIN_CALL, args[0]);
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
setImmediate(() => {
|
||||
emit('chat:addSuggestion', '/call', 'Call a player', [
|
||||
emit("chat:addSuggestion", "/call", "Call a player", [
|
||||
{
|
||||
name: 'Phone Number',
|
||||
help: 'The phone number to call'
|
||||
}
|
||||
])
|
||||
})
|
||||
name: "Phone Number",
|
||||
help: "The phone number to call",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.PHONE_BEGIN_CALL);
|
||||
on(`__cfx_nui:${events.PHONE_BEGIN_CALL}`, (data: any) => {
|
||||
emitNet(events.PHONE_BEGIN_CALL, data.number)
|
||||
})
|
||||
emitNet(events.PHONE_BEGIN_CALL, data.number);
|
||||
});
|
||||
|
||||
|
||||
onNet(events.PHONE_START_CALL, (target: string, phoneNumber: string, id: any) => {
|
||||
console.log(`You are talking to ${target} who as the number ${phoneNumber}`);
|
||||
exp["mumble-voip"].SetCallChannel(id+1)
|
||||
})
|
||||
onNet(
|
||||
events.PHONE_START_CALL,
|
||||
(target: string, phoneNumber: string, id: any) => {
|
||||
console.log(
|
||||
`You are talking to ${target} who as the number ${phoneNumber}`
|
||||
);
|
||||
exp["mumble-voip"].SetCallChannel(id + 1);
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user