mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Merge branch 'master' of github.com:Re-Ignited-Development/new-phone-who-dis into feature/messages
This commit is contained in:
commit
b87baeb12e
52 files changed
+1214
-210
No files matched your search
@@ -12,7 +12,6 @@ onNet(events.BANK_SEND_TRANSFERS, (transfer: any) => {
|
||||
})
|
||||
|
||||
onNet(events.BANK_SEND_CREDENTIALS, (credentials: any) => {
|
||||
console.log("Client:", credentials.balance, credentials.name)
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: "BANK",
|
||||
@@ -26,8 +25,28 @@ RegisterNuiCallbackType(events.BANK_ADD_TRANSFER);
|
||||
on(`__cfx_nui:${events.BANK_ADD_TRANSFER}`, (data: any) => {
|
||||
const transfer = data;
|
||||
emitNet(events.BANK_ADD_TRANSFER, transfer)
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
emitNet(events.BANK_FETCH_TRANSACTIONS);
|
||||
}, 500)
|
||||
onNet(events.BANK_ADD_TRANSFER_SUCCESS, () => {
|
||||
emitNet(events.BANK_FETCH_TRANSACTIONS);
|
||||
})
|
||||
|
||||
onNet(events.BANK_TRANSACTION_ALERT, (bool: boolean) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setAlert',
|
||||
data: bool
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
onNet(events.BANK_TRANSACTION_NOTIFICATION, (transfer: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: "BANK",
|
||||
method: 'setNotification',
|
||||
data: transfer
|
||||
})
|
||||
)
|
||||
})
|
||||
@@ -17,8 +17,29 @@ on(`__cfx_nui:${events.CONTACTS_ADD_CONTACT}`, (data: any) => {
|
||||
const avatar = data.avatar;
|
||||
emitNet(events.CONTACTS_ADD_CONTACT, number, display, avatar);
|
||||
|
||||
setTimeout(() => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS)
|
||||
}, 500)
|
||||
});
|
||||
|
||||
onNet(events.CONTACTS_ADD_CONTACT_SUCCESS, () => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS)
|
||||
})
|
||||
|
||||
|
||||
RegisterNuiCallbackType(events.CONTACTS_UPDATE_CONTACT);
|
||||
on(`__cfx_nui:${events.CONTACTS_UPDATE_CONTACT}`, (data: any) => {
|
||||
const contact = data;
|
||||
emitNet(events.CONTACTS_UPDATE_CONTACT, contact)
|
||||
})
|
||||
|
||||
onNet(events.CONTACTS_UPDATE_CONTACT_SUCCESS, () => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS)
|
||||
})
|
||||
|
||||
RegisterNuiCallbackType(events.CONTACTS_DELETE_CONTACT);
|
||||
on(`__cfx_nui:${events.CONTACTS_DELETE_CONTACT}`, (data: any) => {
|
||||
const contact = data;
|
||||
emitNet(events.CONTACTS_DELETE_CONTACT, contact)
|
||||
})
|
||||
|
||||
onNet(events.CONTACTS_DELETE_CONTACT_SUCCESS, () => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS)
|
||||
})
|
||||
@@ -235,10 +235,6 @@ async function Phone() {
|
||||
isPhoneOpen = true;
|
||||
await phoneOpenAnim(); // Animation starts before the phone is open
|
||||
emitNet('phone:getCredentials')
|
||||
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||
emitNet(events.SELLOUT_FETCH_LISTING);
|
||||
emitNet(events.BANK_FETCH_TRANSACTIONS);
|
||||
emitNet(events.BANK_GET_CREDENTIALS);
|
||||
console.log("Sellout fetched from client side")// Gets the credentials. Will eventually most likely only get the phone number and name, idk.
|
||||
SetCursorLocation(0.90, 0.922) //Experimental
|
||||
let res = GetActiveScreenResolution()
|
||||
@@ -274,10 +270,6 @@ async function Phone() {
|
||||
isPhoneOpen = true;
|
||||
await phoneOpenAnim(); // Animation starts before the phone is open
|
||||
emitNet('phone:getCredentials')
|
||||
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||
emitNet(events.SELLOUT_FETCH_LISTING);
|
||||
emitNet(events.BANK_FETCH_TRANSACTIONS);
|
||||
emitNet(events.BANK_GET_CREDENTIALS);
|
||||
console.log("Sellout fetched from client side")
|
||||
SetCursorLocation(0.936, 0.922) //Experimental
|
||||
let res = GetActiveScreenResolution()
|
||||
@@ -306,6 +298,30 @@ async function Phone() {
|
||||
}
|
||||
}
|
||||
|
||||
// DO NOT CHANGE THIS EITHER, PLEASE - CHIP
|
||||
|
||||
// contacts app
|
||||
RegisterNuiCallbackType(events.OPEN_APP_CONTACTS);
|
||||
on(`__cfx_nui:${events.OPEN_APP_CONTACTS}`, () => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||
})
|
||||
|
||||
RegisterNuiCallbackType(events.OPEN_APP_LISTINGS);
|
||||
on(`__cfx_nui:${events.OPEN_APP_LISTINGS}`, () => {
|
||||
emitNet(events.SELLOUT_FETCH_LISTING);
|
||||
})
|
||||
|
||||
RegisterNuiCallbackType(events.OPEN_APP_NOTES);
|
||||
on(`__cfx_nui:${events.OPEN_APP_NOTES}`, () => {
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
})
|
||||
|
||||
RegisterNuiCallbackType(events.OPEN_APP_BANK);
|
||||
on(`__cfx_nui:${events.OPEN_APP_BANK}`, () => {
|
||||
emitNet(events.BANK_FETCH_TRANSACTIONS);
|
||||
emitNet(events.BANK_GET_CREDENTIALS);
|
||||
})
|
||||
|
||||
RegisterCommand(
|
||||
"phone",
|
||||
() => {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import events from "../utils/events";
|
||||
|
||||
onNet(events.NOTE_SEND_NOTE, (notes: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: "NOTES",
|
||||
method: "setNotes",
|
||||
data: notes,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.NOTE_ADD_NOTE);
|
||||
on(`__cfx_nui:${events.NOTE_ADD_NOTE}`, (data: any) => {
|
||||
const note = data;
|
||||
emitNet(events.NOTE_ADD_NOTE, note);
|
||||
});
|
||||
|
||||
onNet(events.NOTE_SEND_NOTE_SUCCESS, () => {
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.NOTE_DELETE_NOTE);
|
||||
on(`__cfx_nui:${events.NOTE_DELETE_NOTE}`, (data: any) => {
|
||||
const noteId = data;
|
||||
emitNet(events.NOTE_DELETE_NOTE, noteId);
|
||||
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.NOTE_UPDATE_NOTE);
|
||||
on(`__cfx_nui:${events.NOTE_UPDATE_NOTE}`, (data: any) => {
|
||||
const note = data;
|
||||
emitNet(events.NOTE_UPDATE_NOTE, note);
|
||||
});
|
||||
|
||||
onNet(events.NOTE_UPDATE_NOTE_SUCCESS, () => {
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
});
|
||||
@@ -4,6 +4,7 @@ import './cl_twitter';
|
||||
import './cl_contacts';
|
||||
import './cl_sellout';
|
||||
import './cl_bank';
|
||||
import './cl_notes';
|
||||
|
||||
export let ESX: ESXClient = null;
|
||||
|
||||
|
||||
Reference in new issue
Block a user