mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
shit fix
This commit is contained in:
1 parent
f23af8da04
commit
552cba3e76
2 files changed
+27
-4
No files matched your search
@@ -51,12 +51,32 @@ onNet('phone:callAccepted', (id: number) => {
|
|||||||
|
|
||||||
RegisterNuiCallbackType(events.PHONE_END_CALL);
|
RegisterNuiCallbackType(events.PHONE_END_CALL);
|
||||||
on(`__cfx_nui:${events.PHONE_END_CALL}`, (data: any) => {
|
on(`__cfx_nui:${events.PHONE_END_CALL}`, (data: any) => {
|
||||||
|
console.log("BIG DICK FOR LISA ANN")
|
||||||
emitNet(events.PHONE_END_CALL, data.phoneNumber);
|
emitNet(events.PHONE_END_CALL, data.phoneNumber);
|
||||||
})
|
})
|
||||||
|
|
||||||
onNet(events.PHONE_CALL_WAS_ENDED, () => {
|
onNet(events.PHONE_CALL_WAS_ENDED, () => {
|
||||||
console.log("Call ended");
|
console.log("Call ended");
|
||||||
exp["mumble-voip"].SetCallChannel(0);
|
exp["mumble-voip"].SetCallChannel(0);
|
||||||
|
SendNuiMessage(
|
||||||
|
JSON.stringify({
|
||||||
|
app: 'CALL',
|
||||||
|
method: 'callModal',
|
||||||
|
data: false,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
SendNuiMessage(
|
||||||
|
JSON.stringify({
|
||||||
|
app: 'CALL',
|
||||||
|
method: 'setCaller',
|
||||||
|
data: {
|
||||||
|
target: null,
|
||||||
|
caller: null,
|
||||||
|
transmitter: null,
|
||||||
|
accepted: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -91,18 +91,21 @@ onNet(events.PHONE_ACCEPT_CALL, async (phoneNumber: string) => {
|
|||||||
onNet(events.PHONE_END_CALL, async (phoneNumber: string) => {
|
onNet(events.PHONE_END_CALL, async (phoneNumber: string) => {
|
||||||
try {
|
try {
|
||||||
const pSource = (global as any).source;
|
const pSource = (global as any).source;
|
||||||
console.log("got the source of accepting", pSource);
|
console.log("got the source of ending", pSource);
|
||||||
|
|
||||||
// target
|
// target
|
||||||
const targetIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
|
const targetIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
|
||||||
|
console.log("ENDED WTF DUDE")
|
||||||
const targetPlayer = await getPlayerFromIdentifier(targetIdentifier);
|
const targetPlayer = await getPlayerFromIdentifier(targetIdentifier);
|
||||||
const channelId = pSource;
|
console.log("holy shit he ended the call")
|
||||||
|
|
||||||
// client that is calling
|
// client that is calling
|
||||||
emitNet(events.PHONE_CALL_WAS_ENDED, pSource, channelId);
|
emitNet(events.PHONE_CALL_WAS_ENDED, pSource);
|
||||||
|
console.log("she ended the call wtf dude fucking bitch");
|
||||||
|
|
||||||
|
|
||||||
// client that is being called
|
// client that is being called
|
||||||
emitNet(events.PHONE_CALL_WAS_ENDED, targetPlayer.source, channelId);
|
emitNet(events.PHONE_CALL_WAS_ENDED, targetPlayer.source);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user