mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
Prettified Code!
This commit is contained in:
1 parent
a8deb8b578
commit
85ffdc571b
2 files changed
+14
-14
No files matched your search
@@ -1,10 +1,10 @@
|
||||
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',
|
||||
"call",
|
||||
(source: number, args: string[], raw: any) => {
|
||||
emitNet(events.PHONE_BEGIN_CALL, args[0]);
|
||||
},
|
||||
@@ -12,10 +12,10 @@ RegisterCommand(
|
||||
);
|
||||
|
||||
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",
|
||||
},
|
||||
]);
|
||||
});
|
||||
@@ -28,10 +28,10 @@ on(`__cfx_nui:${events.PHONE_BEGIN_CALL}`, (data: any) => {
|
||||
onNet(events.PHONE_START_CALL, (target: string, phoneNumber: string) => {
|
||||
console.log(`You are talking to ${target} who has the number ${phoneNumber}`);
|
||||
// Temporary for testing
|
||||
exp['mumble-voip'].SetCallChannel(1);
|
||||
exp["mumble-voip"].SetCallChannel(1);
|
||||
});
|
||||
|
||||
onNet(events.PHONE_CALL_WAS_ENDED, () => {
|
||||
console.log('Call ended');
|
||||
exp['mumble-voip'].SetCallChannel(0);
|
||||
console.log("Call ended");
|
||||
exp["mumble-voip"].SetCallChannel(0);
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ESX } from './server';
|
||||
import events from '../utils/events';
|
||||
import { getIdentifierByPhoneNumber, getPhoneNumberFromID } from './functions';
|
||||
import { XPlayer } from 'esx.js/@types/server';
|
||||
import { ESX } from "./server";
|
||||
import events from "../utils/events";
|
||||
import { getIdentifierByPhoneNumber, getPhoneNumberFromID } from "./functions";
|
||||
import { XPlayer } from "esx.js/@types/server";
|
||||
/**
|
||||
* Returns the player phoneNumber for a passed identifier
|
||||
* @param identifier The players phone number
|
||||
@@ -20,7 +20,7 @@ function getPlayerFromIdentifier(identifier: string): Promise<XPlayer> {
|
||||
}
|
||||
}
|
||||
|
||||
rej(new Error('Call Target Identifier was not found in xPlayers array'));
|
||||
rej(new Error("Call Target Identifier was not found in xPlayers array"));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user