mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +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 = () => {
|
||||
BeginTextCommandDisplayHelp('TWOSTRINGS');
|
||||
BeginTextCommandDisplayHelp('THREESTRINGS');
|
||||
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);
|
||||
};
|
||||
|
||||
@@ -59,9 +60,12 @@ on(`__cfx_nui:${events.CAMERA_TAKE_PHOTO}`, async (data: any, cb: Function) => {
|
||||
await Delay(0);
|
||||
let frontCam = false;
|
||||
displayHelperText();
|
||||
if (IsControlJustPressed(1, 27)) {
|
||||
frontCam = !frontCam;
|
||||
CellFrontCamActivate(frontCam);
|
||||
if (IsControlJustReleased(1, 27)) {
|
||||
// selfie
|
||||
CellFrontCamActivate(true);
|
||||
} else if (IsControlJustReleased(1, 173)) {
|
||||
// not selfie, duh
|
||||
CellFrontCamActivate(false);
|
||||
} else if (IsControlJustPressed(1, 176)) {
|
||||
await handleTakePicture();
|
||||
} else if (IsControlJustPressed(1, 177)) {
|
||||
|
||||
Reference in new issue
Block a user