mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
tweak(server/calls): Tweaked call handling
Added Sanity checks Switched timestamp creation to server
This commit is contained in:
1 parent
bc8a89d825
commit
adf9758d9f
2 files changed
+21
-11
No files matched your search
@@ -6,8 +6,7 @@ const exp = (global as any).exports;
|
||||
|
||||
RegisterNuiCallbackType(events.PHONE_INITIALIZE_CALL); // Fires when the call is started.
|
||||
on(`__cfx_nui:${events.PHONE_INITIALIZE_CALL}`, (data: any, cb: Function) => {
|
||||
const start = Date.now();
|
||||
emitNet(events.PHONE_INITIALIZE_CALL, data.number, start);
|
||||
emitNet(events.PHONE_INITIALIZE_CALL, data.number);
|
||||
cb();
|
||||
});
|
||||
|
||||
@@ -58,8 +57,7 @@ onNet(
|
||||
|
||||
RegisterNuiCallbackType(events.PHONE_CALL_REJECTED); // Fires when cancelling and rejecting a call.
|
||||
on(`__cfx_nui:${events.PHONE_CALL_REJECTED}`, (data: any, cb: Function) => {
|
||||
const end = Date.now();
|
||||
emitNet(events.PHONE_CALL_REJECTED, data.phoneNumber, end);
|
||||
emitNet(events.PHONE_CALL_REJECTED, data.phoneNumber);
|
||||
cb();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user