mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
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:
1 parent
f6395e4b8e
commit
104fda2c11
10 files changed
+22
-28
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user