Fix: Animation being triggered if the phone isn't open.

This commit is contained in:
RockySouthpaw authored and GitHub committed 2021-03-01 17:05:05 -05:00
1 parent f58c30b0d9
commit 8ecb91e71f
1 file changed
+5 -3
+5 -3
View File
@@ -174,9 +174,11 @@ const handleCallStartNormalAnim = async (playerPed: number): Promise<void> => {
const handleCallEndNormalAnim = async (playerPed: number): Promise<void> => {
const DICT = 'cellphone@';
const ANIM = 'cellphone_call_to_text';
await loadAnimDict(DICT);
TaskPlayAnim(playerPed, DICT, ANIM, 2.5, 8.0, -1, 50, 0, false, false, false);
if (IsEntityPlayingAnim(playerPed, 'cellphone@', 'cellphone_call_listen_base', 49)) {
await loadAnimDict(DICT);
TaskPlayAnim(playerPed, DICT, ANIM, 2.5, 8.0, -1, 50, 0, false, false, false);
}
};
export async function phoneOpenAnim(): Promise<void> {