mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Merge branch 'master' of https://github.com/project-error/new-phone-who-dis
This commit is contained in:
commit
9f5d5e50a8
2 files changed
+24
-9
No files matched your search
@@ -2,10 +2,7 @@ import config from '../utils/config';
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { phoneCloseAnim, phoneOpenAnim, removePhoneProp } from './functions';
|
import { phoneCloseAnim, phoneOpenAnim, removePhoneProp } from './functions';
|
||||||
|
|
||||||
let prop = 0;
|
|
||||||
let isPhoneOpen = false;
|
let isPhoneOpen = false;
|
||||||
let propCreated = false;
|
|
||||||
let phoneModel = 'prop_amb_phone'; // Refered to in newphoneProp function. Requires custom phone being streamed.
|
|
||||||
|
|
||||||
RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'f1');
|
RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'f1');
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { Delay } from '../utils/fivem';
|
import { Delay } from '../utils/fivem';
|
||||||
|
|
||||||
let prop = 0;
|
let prop = 0;
|
||||||
let isPhoneOpen = false;
|
|
||||||
let propCreated = false;
|
let propCreated = false;
|
||||||
const phoneModel = 'prop_amb_phone'
|
const phoneModel = 'prop_amb_phone';
|
||||||
|
|
||||||
/* * * * * * * * * * * * *
|
/* * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
@@ -83,7 +82,7 @@ export async function loadAnimDict(dict: any) {
|
|||||||
const handleOpenVehicleAnim = async (playerPed: number): Promise<void> => {
|
const handleOpenVehicleAnim = async (playerPed: number): Promise<void> => {
|
||||||
const dict = 'anim@cellphone@in_car@ps';
|
const dict = 'anim@cellphone@in_car@ps';
|
||||||
|
|
||||||
SetCurrentPedWeapon(playerPed, 0xA2719263, true)
|
SetCurrentPedWeapon(playerPed, 0xa2719263, true);
|
||||||
ClearPedTasks(playerPed);
|
ClearPedTasks(playerPed);
|
||||||
await loadAnimDict(dict);
|
await loadAnimDict(dict);
|
||||||
TaskPlayAnim(
|
TaskPlayAnim(
|
||||||
@@ -107,7 +106,7 @@ const handleOpenNormalAnim = async (playerPed: number): Promise<void> => {
|
|||||||
//While not in a vehicle it will use this dict.
|
//While not in a vehicle it will use this dict.
|
||||||
const dict = 'cellphone@';
|
const dict = 'cellphone@';
|
||||||
|
|
||||||
SetCurrentPedWeapon(playerPed, 0xA2719263, true)
|
SetCurrentPedWeapon(playerPed, 0xa2719263, true);
|
||||||
ClearPedTasks(playerPed);
|
ClearPedTasks(playerPed);
|
||||||
await loadAnimDict(dict);
|
await loadAnimDict(dict);
|
||||||
TaskPlayAnim(
|
TaskPlayAnim(
|
||||||
@@ -175,9 +174,28 @@ const handleCallEndNormalAnim = async (playerPed: number): Promise<void> => {
|
|||||||
const DICT = 'cellphone@';
|
const DICT = 'cellphone@';
|
||||||
const ANIM = 'cellphone_call_to_text';
|
const ANIM = 'cellphone_call_to_text';
|
||||||
|
|
||||||
if (IsEntityPlayingAnim(playerPed, 'cellphone@', 'cellphone_call_listen_base', 49)) {
|
if (
|
||||||
|
IsEntityPlayingAnim(
|
||||||
|
playerPed,
|
||||||
|
'cellphone@',
|
||||||
|
'cellphone_call_listen_base',
|
||||||
|
49
|
||||||
|
)
|
||||||
|
) {
|
||||||
await loadAnimDict(DICT);
|
await loadAnimDict(DICT);
|
||||||
TaskPlayAnim(playerPed, DICT, ANIM, 2.5, 8.0, -1, 50, 0, false, false, false);
|
TaskPlayAnim(
|
||||||
|
playerPed,
|
||||||
|
DICT,
|
||||||
|
ANIM,
|
||||||
|
2.5,
|
||||||
|
8.0,
|
||||||
|
-1,
|
||||||
|
50,
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user