[Release] Cellphone Camera

This feature would be amazing…if you could force photos to post directly to a discord channel for the server… like a webhook with it.

Hi, thanks for this resource! It works really well with https://forum.cfx.re/c/fivem-snapmatic/68 :slight_smile:

5 Likes

Thank you! I spent the past hour trying to figure out where they were saving to.

And no, you’re not overlooking anything. That’s how the Snapmatic photos are stored by vanilla GTA Online. Thanks Rockstar! :roll_eyes:

Edit: I just exported my photo using the tool linked to in LSRPT’s post and it actually came out in full 1080x1920 with what looks like the original quality. Make sure that the “export size” in the settings is set to “default”, even though default says it’s 960x536.

For a command version of this (I’m not responsible if it breaks or causes problems, if you see an issue lmk)…

Add this to client.lua ~~

RegisterNetEvent(‘selfie’)
AddEventHandler(‘selfie’, function(source)
DestroyMobilePhone()
phone = true
if phone == true then
CellFrontCamActivate(true)
A = true
end
if A == true and phone == true then
CreateMobilePhone(phoneId)
CellCamActivate(true, true)
end
end)

RegisterNetEvent(‘selfieoff’)
AddEventHandler(‘selfieoff’, function(source)
DestroyMobilePhone()
phone = false
A = false
CellCamActivate(false, false)
CancelEvent()
end)

Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if phone == true then
HideHudComponentThisFrame(1)
HideHudComponentThisFrame(2)
HideHudComponentThisFrame(3)
HideHudComponentThisFrame(4)
HideHudComponentThisFrame(6)
HideHudComponentThisFrame(7)
HideHudComponentThisFrame(8)
HideHudComponentThisFrame(9)
HideHudComponentThisFrame(13)
HideHudComponentThisFrame(17)
HideHudComponentThisFrame(20)
end
end
end)

Add this to server.lua

AddEventHandler(‘chatMessage’, function(source, n, message)
if message == “/selfie” then
CancelEvent();
TriggerClientEvent(‘selfie’, source);

elseif message == “/selfieoff” then
CancelEvent();
TriggerClientEvent(‘selfieoff’, source);
end
end)
~ fixes for infinate loop to prevent client crashes.

oh god that is horrible, why even use a super outdated style of command adding?

I’m still learning and it works at least. Do you have any suggestions to make it better?

where i Put this file in gcphone?

Is it possible to put there other phone prop like “prop_amb_phone” because in the code there aren’t any props names :frowning:

phones = {
[0] = “Michael’s”,
[1] = “Trevor’s”,
[2] = “Franklin’s”,
[4] = “Prologue”
}

why does my photo look like this https://media.discordapp.net/attachments/874406079788896306/929122155902423040/screenshot.jpg
can you help?