feat(global): major fixes...i dont even know that to call this commit so ill just say its global. Who even cares

This commit is contained in:
Dillon Skaggs authored and GitHub committed 2021-07-06 23:10:47 +02:00
1 parent f6395e4b8e
commit 104fda2c11
10 files changed
+22 -28

No files matched your search

+7 -2
View File
@@ -29,9 +29,11 @@ const displayHelperText = () => {
EndTextCommandDisplayHelp(0, true, false, -1);
};
RegisterNuiCallbackType(PhotoEvents.TAKE_PHOTO);
on(`__cfx_nui:${PhotoEvents.TAKE_PHOTO}`, async (data: any, cb: Function) => {
cb();
emit('npwd:disableControlActions', false);
// Create Phone Prop
let frontCam = false;
CreateMobilePhone(1);
@@ -46,7 +48,6 @@ on(`__cfx_nui:${PhotoEvents.TAKE_PHOTO}`, async (data: any, cb: Function) => {
while (inCameraMode) {
await Delay(0);
displayHelperText();
if (IsControlJustPressed(1, 27)) {
frontCam = !frontCam;
CellFrontCamActivate(frontCam);
@@ -55,12 +56,16 @@ on(`__cfx_nui:${PhotoEvents.TAKE_PHOTO}`, async (data: any, cb: Function) => {
} else if (IsControlJustPressed(1, 177)) {
handleCameraExit();
break;
}
}
displayHelperText();
}
ClearHelp(true);
emit('npwd:disableControlActions', true);
});
const handleTakePicture = async () => {
// Wait a frame so we don't draw the display helper text
await Delay(0);
takePhoto();
await Delay(200);
DestroyMobilePhone();