Hello everyone I am currently working on a script and I have a problem where I need to create a camera and I tried using this code:
function DeathCam()
local PlayerPed = PlayerPedId()
local pos = GetEntityCoords(PlayerPed)
local heading = GetEntityHeading(PlayerPed)
cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", pos.x, pos.y + 0.5, pos.z + 0.5, 0.0 ,0.0, heading, 60.00, false, 0)
SetCamActive(cam, true)
FreezeEntityPosition(PlayerPed, false)
print("displaying cam")
end
It is printing the “displaying cam” but its just not showing the camera.
If someone can help me it will be much appreciated.