Adjusted animations/cursor location

This commit is contained in:
Darrian Gaylor committed 2020-10-18 20:05:03 -04:00
1 parent c9d81bfe1b
commit 88f527707c
1 file changed
+5 -5
+5 -5
View File
@@ -233,11 +233,11 @@ async function Phone() {
if (carryingPhone) { if (carryingPhone) {
if (!isPhoneOpen) { if (!isPhoneOpen) {
isPhoneOpen = true; isPhoneOpen = true;
await phoneOpenAnim(); await phoneOpenAnim(); // Animation starts before the phone is open
emitNet(events.CONTACTS_GET_CONTACTS); emitNet(events.CONTACTS_GET_CONTACTS);
emitNet(events.SELLOUT_FETCH_LISTING); emitNet(events.SELLOUT_FETCH_LISTING);
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.90, 0.922) //Experimental
let res = GetActiveScreenResolution() let res = GetActiveScreenResolution()
SendNuiMessage( SendNuiMessage(
JSON.stringify({ JSON.stringify({
@@ -250,7 +250,6 @@ async function Phone() {
SetNuiFocus(true, true); SetNuiFocus(true, true);
} else { } else {
isPhoneOpen = false; isPhoneOpen = false;
await phoneCloseAnim();
SendNuiMessage( SendNuiMessage(
//Hides phone //Hides phone
JSON.stringify({ JSON.stringify({
@@ -260,6 +259,7 @@ async function Phone() {
}) })
); );
SetNuiFocus(false, false); SetNuiFocus(false, false);
await phoneCloseAnim(); // Animation starts after the UI is closed.
} }
} else { } else {
noPhone(); noPhone();
@@ -269,7 +269,7 @@ async function Phone() {
console.log("CONFIG OFF"); console.log("CONFIG OFF");
if (!isPhoneOpen) { if (!isPhoneOpen) {
isPhoneOpen = true; isPhoneOpen = true;
await phoneOpenAnim(); await phoneOpenAnim(); // Animation starts before the phone is open
emitNet(events.CONTACTS_GET_CONTACTS); emitNet(events.CONTACTS_GET_CONTACTS);
emitNet(events.SELLOUT_FETCH_LISTING); emitNet(events.SELLOUT_FETCH_LISTING);
emitNet('phone:getCredentials') emitNet('phone:getCredentials')
@@ -286,7 +286,6 @@ async function Phone() {
SetNuiFocus(true, true); SetNuiFocus(true, true);
} else { } else {
isPhoneOpen = false; isPhoneOpen = false;
await phoneCloseAnim();
SendNuiMessage( SendNuiMessage(
//Hides phone //Hides phone
JSON.stringify({ JSON.stringify({
@@ -296,6 +295,7 @@ async function Phone() {
}) })
); );
SetNuiFocus(false, false); SetNuiFocus(false, false);
await phoneCloseAnim(); // Animation starts after the UI is closed.
} }
} }
} }