mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
not reverted, but reverted
This commit is contained in:
1 parent
a651eb9242
commit
1e88ca4242
1 file changed
+6
-10
@@ -35,18 +35,17 @@ function CellFrontCamActivate(activate: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const displayHelperText = () => {
|
const displayHelperText = () => {
|
||||||
BeginTextCommandDisplayHelp('THREESTRINGS');
|
BeginTextCommandDisplayHelp('TWOSTRINGS');
|
||||||
AddTextComponentString('Exit Camera Mode: ~INPUT_CELLPHONE_CANCEL~');
|
AddTextComponentString('Exit Camera Mode: ~INPUT_CELLPHONE_CANCEL~');
|
||||||
AddTextComponentString('Open Front camera: ~INPUT_PHONE~');
|
AddTextComponentString('Toggle Front/Back: ~INPUT_PHONE~');
|
||||||
AddTextComponentString('Open Rear camera: ~INPUT_CELLPHONE_DOWN~');
|
|
||||||
EndTextCommandDisplayHelp(0, true, false, -1);
|
EndTextCommandDisplayHelp(0, true, false, -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
RegisterNuiCallbackType(events.CAMERA_TAKE_PHOTO);
|
RegisterNuiCallbackType(events.CAMERA_TAKE_PHOTO);
|
||||||
on(`__cfx_nui:${events.CAMERA_TAKE_PHOTO}`, async (data: any, cb: Function) => {
|
on(`__cfx_nui:${events.CAMERA_TAKE_PHOTO}`, async (data: any, cb: Function) => {
|
||||||
cb();
|
cb();
|
||||||
let frontCam = false;
|
|
||||||
// Create Phone Prop
|
// Create Phone Prop
|
||||||
|
let frontCam = false;
|
||||||
CreateMobilePhone(1);
|
CreateMobilePhone(1);
|
||||||
// Active Camera Change
|
// Active Camera Change
|
||||||
CellCamActivate(true, true);
|
CellCamActivate(true, true);
|
||||||
@@ -60,12 +59,9 @@ on(`__cfx_nui:${events.CAMERA_TAKE_PHOTO}`, async (data: any, cb: Function) => {
|
|||||||
while (inCameraMode) {
|
while (inCameraMode) {
|
||||||
await Delay(0);
|
await Delay(0);
|
||||||
displayHelperText();
|
displayHelperText();
|
||||||
if (IsControlJustReleased(1, 27)) {
|
if (IsControlJustPressed(1, 27)) {
|
||||||
// selfie
|
frontCam = !frontCam;
|
||||||
CellFrontCamActivate(true);
|
CellFrontCamActivate(frontCam);
|
||||||
} 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