[Release] Forced First Person Camera When Aiming / Shooting

Hello, i was just wondering if this works on qbus server?

It’s stand alone

not sure if relevant but when using this script, it interferes with qb weathersync from causing a total blackout.

как мога да влезна в сървъра турбо :smile:

How do I set this so it doesn’t happen with some weapons? I do not want the taser to be detected.

Does someone know why its not working, i put it in my recources file and ensured it

it’s outdated. Is there a new version off it?

local shot = false
local check = false
local check2 = false
local count = 0

-- VEHICLE ADS
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        if IsPlayerFreeAiming(PlayerId()) then
            if GetFollowPedCamViewMode() == 4 and check == false then
                check = false
            else
                SetFollowVehicleCamViewMode(4)
                check = true
            end
        else
            if check == true then
                SetFollowVehicleCamViewMode(1)
                check = false
            end
        end
    end
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        if IsPedShooting(PlayerPedId()) and shot == false and GetFollowPedCamViewMode() ~= 4 then
            check2 = true
            shot = true
			SetFollowVehicleCamViewMode(4)
        end
        if IsPedShooting(PlayerPedId()) and shot == true and GetFollowPedCamViewMode() == 4 then
            count = 0
        end
        if not IsPedShooting(PlayerPedId()) and shot == true then
            count = count + 1
        end
        if not IsPedShooting(PlayerPedId()) and shot == true then
            if not IsPedShooting(PlayerPedId()) and shot == true and count > 20 then
                if check2 == true then
                    check2 = false
                    shot = false
                    SetFollowVehicleCamViewMode(1)
                end
            end
        end
    end
end)

-- roll Prevention
Citizen.CreateThread(function()
    while true do
        if (not IsPedInAnyVehicle(PlayerPedId(),false)) then
            Citizen.Wait(4)
            if IsPlayerFreeAiming(PlayerPedId()) then
                DisableControlAction(0, 22, 1)
            else
                Citizen.Wait(100)
            end
        else
            Citizen.Wait(500)
        end
    end
end)

The script not working while have fists or a melee weapon… need to be updated so uou also in first person while melee or fists

How to install this?