Hello, I am making this camera scene to be triggered somehow.
Here is the code to spawn camera
function Scena1()
local kamera = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1)
SetCamCoord(kamera, 3069.11, -4595.33, 15.26)
SetCamRot(kamera, 0, 0, 81.62)
Wait(20000)
end
And… there is to delete it
function IzbrisiScenu()
local kamera = CreateCam(“DEFAULT_SCRIPTED_CAMERA”, 1)
RenderScriptCams(true, false, 500)
while IsCamRendering(kamera) do
Citizen.Wait(0)
end
DestroyCam(kamera)
end
and where I am calling these two functions are
if reason == "" then
TriggerServerEvent('esx_identity:setIdentity', data, myIdentifiers)
EnableGui(false)
Citizen.Wait(500)
Scena1()
IzbrisiScenu()
TriggerEvent('esx_skin:openSaveableMenu', myIdentifiers.id)
else
print("POGREŠILI STE : " .. reason)
end