mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Fix(Main): Event handling
This commit is contained in:
1 parent
25623dff1d
commit
1e3b8ce6a7
1 file changed
+5
-2
@@ -1,6 +1,7 @@
|
|||||||
import { ESX } from "../client/client";
|
import { ESX } from "../client/client";
|
||||||
import config from '../utils/config';
|
import config from '../utils/config';
|
||||||
import { Delay } from '../utils/fivem';
|
import { Delay } from '../utils/fivem';
|
||||||
|
import events from '../utils/events';
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('phone:close', (source: any, args: string[], raw: any) => {
|
RegisterCommand('phone:close', (source: any, args: string[], raw: any) => {
|
||||||
@@ -151,6 +152,7 @@ async function Phone() {
|
|||||||
isPhoneOpen = true
|
isPhoneOpen = true
|
||||||
await phoneOpenAnim()
|
await phoneOpenAnim()
|
||||||
console.log("phone is now open") //Left for testing purposes.
|
console.log("phone is now open") //Left for testing purposes.
|
||||||
|
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||||
emitNet('phone:getCredentials') // Gets the credentials. Will eventually most likely only get the phone number and name, idk.
|
emitNet('phone:getCredentials') // Gets the credentials. Will eventually most likely only get the phone number and name, idk.
|
||||||
SetCursorLocation(0.936, 0.922) //Experimental
|
SetCursorLocation(0.936, 0.922) //Experimental
|
||||||
let res = GetActiveScreenResolution()
|
let res = GetActiveScreenResolution()
|
||||||
@@ -187,8 +189,9 @@ async function Phone() {
|
|||||||
if (!isPhoneOpen) {
|
if (!isPhoneOpen) {
|
||||||
isPhoneOpen = true
|
isPhoneOpen = true
|
||||||
await phoneOpenAnim()
|
await phoneOpenAnim()
|
||||||
console.log("phone is now open") //Left for testing purposes.
|
console.log("phone is now open") //Left for testing purposes.
|
||||||
TriggerServerEvent('phone:getCredentials', source)
|
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||||
|
emitNet('phone:getCredentials')
|
||||||
SetCursorLocation(0.936, 0.922) //Experimental
|
SetCursorLocation(0.936, 0.922) //Experimental
|
||||||
let res = GetActiveScreenResolution()
|
let res = GetActiveScreenResolution()
|
||||||
SendNuiMessage(
|
SendNuiMessage(
|
||||||
|
|||||||
Reference in new issue
Block a user