From f97c43b07d76ab8ba8f82f0919abfdb9207f0118 Mon Sep 17 00:00:00 2001 From: Eichenholz Date: Thu, 6 Aug 2026 12:32:41 +0200 Subject: [PATCH] ENH - play camera selfie emote --- sky_phone/fxmanifest.lua | 1 + sky_phone/source/client/camera.lua | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/sky_phone/fxmanifest.lua b/sky_phone/fxmanifest.lua index e30a5ad..dacc51f 100644 --- a/sky_phone/fxmanifest.lua +++ b/sky_phone/fxmanifest.lua @@ -57,3 +57,4 @@ files { ui_page 'source/html/index.html' dependency 'oxmysql' +dependency 'rpemotes' diff --git a/sky_phone/source/client/camera.lua b/sky_phone/source/client/camera.lua index f6f5993..37590a5 100644 --- a/sky_phone/source/client/camera.lua +++ b/sky_phone/source/client/camera.lua @@ -5,6 +5,8 @@ local front_camera_fov = 25.0 local front_camera_distance = 0.75 local front_camera_height = 0.05 local front_camera_target_height = 0.03 +local camera_emote = "malemirrorselfie3" +local camera_emote_texture_variation = 8 local camera_state = { active = false, enforcing = false, @@ -19,6 +21,16 @@ local camera_state = { previous_vehicle_view = nil, } +local function start_camera_emote() + exports.rpemotes:EmoteCommandStart(camera_emote, camera_emote_texture_variation) +end + +local function stop_camera_emote() + if LocalPlayer.state.currentEmote == camera_emote then + exports.rpemotes:EmoteCancel(true) + end +end + local function rotation_to_direction(rotation) local z = math.rad(rotation.z) local x = math.rad(rotation.x) @@ -138,6 +150,7 @@ local function set_camera_active(active) end camera_state.active = active if active then + start_camera_emote() camera_state.front_camera = false clear_front_camera() camera_state.previous_ped_view = GetFollowPedCamViewMode() @@ -179,6 +192,7 @@ local function set_camera_active(active) end camera_state.flash_enabled = false camera_state.front_camera = false + stop_camera_emote() clear_front_camera() restore_camera_view() if not camera_state.nui_focused then