mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
fix(resources/client/photos): fix toggle
This commit is contained in:
1 parent
6f0a2ba30d
commit
7432e85a9a
1 file changed
+9
-5
@@ -35,9 +35,10 @@ function CellFrontCamActivate(activate: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const displayHelperText = () => {
|
const displayHelperText = () => {
|
||||||
BeginTextCommandDisplayHelp('TWOSTRINGS');
|
BeginTextCommandDisplayHelp('THREESTRINGS');
|
||||||
AddTextComponentString('Exit Camera Mode: ~INPUT_CELLPHONE_CANCEL~');
|
AddTextComponentString('Exit Camera Mode: ~INPUT_CELLPHONE_CANCEL~');
|
||||||
AddTextComponentString('Toggle Front/Back: ~INPUT_PHONE~');
|
AddTextComponentString('Open Front camera: ~INPUT_PHONE~');
|
||||||
|
AddTextComponentString('Open Rear camera: ~INPUT_CELLPHONE_DOWN~');
|
||||||
EndTextCommandDisplayHelp(0, true, false, -1);
|
EndTextCommandDisplayHelp(0, true, false, -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -59,9 +60,12 @@ on(`__cfx_nui:${events.CAMERA_TAKE_PHOTO}`, async (data: any, cb: Function) => {
|
|||||||
await Delay(0);
|
await Delay(0);
|
||||||
let frontCam = false;
|
let frontCam = false;
|
||||||
displayHelperText();
|
displayHelperText();
|
||||||
if (IsControlJustPressed(1, 27)) {
|
if (IsControlJustReleased(1, 27)) {
|
||||||
frontCam = !frontCam;
|
// selfie
|
||||||
CellFrontCamActivate(frontCam);
|
CellFrontCamActivate(true);
|
||||||
|
} else if (IsControlJustReleased(1, 173)) {
|
||||||
|
// not selfie, duh
|
||||||
|
CellFrontCamActivate(false);
|
||||||
} else if (IsControlJustPressed(1, 176)) {
|
} else if (IsControlJustPressed(1, 176)) {
|
||||||
await handleTakePicture();
|
await handleTakePicture();
|
||||||
} else if (IsControlJustPressed(1, 177)) {
|
} else if (IsControlJustPressed(1, 177)) {
|
||||||
|
|||||||
Reference in new issue
Block a user