Combatbeginner8 min readupdated 11 Sept 2026

Forcing first-person aim in FiveM

The short answer

GetFollowPedCamViewMode() returns the current on-foot view (4 = first person). When the player starts aiming, store it and call SetFollowPedCamViewMode(4); when they stop, restore the stored mode. For vehicles use GetFollowVehicleCamViewMode() / SetFollowVehicleCamViewMode(4). Disable control 0 (V) while aiming so players cannot switch back.

Third-person aiming lets players peek around corners without exposing themselves. Many roleplay and PvP servers therefore force first person while a weapon is raised — and restore the player’s own view when they lower it. It takes one small client script.

Forcing first-person aim in FiveM — illustrated with a FiveM-compatible minimap render

#View modes

ModeView
0Third person, near
1Third person, medium
2Third person, far
4First person

#The script

client.lua
local FIRST = 4
local saved

CreateThread(function()
    while true do
        local sleep = 250
        local ped = PlayerPedId()

        if IsPedArmed(ped, 4) then
            sleep = 0
            local aiming = IsControlPressed(0, 25) or IsPlayerFreeAiming(PlayerId())
            local inVeh = IsPedInAnyVehicle(ped, false)

            if aiming then
                DisableControlAction(0, 0, true)
                if inVeh then
                    if GetFollowVehicleCamViewMode() ~= FIRST then
                        saved = saved or GetFollowVehicleCamViewMode()
                        SetFollowVehicleCamViewMode(FIRST)
                    end
                elseif GetFollowPedCamViewMode() ~= FIRST then
                    saved = saved or GetFollowPedCamViewMode()
                    SetFollowPedCamViewMode(FIRST)
                end
            elseif saved then
                if inVeh then SetFollowVehicleCamViewMode(saved) else SetFollowPedCamViewMode(saved) end
                saved = nil
            end
        elseif saved then
            SetFollowPedCamViewMode(saved)
            saved = nil
        end

        Wait(sleep)
    end
end)

The loop sleeps while unarmed and runs every frame only while a firearm is out, which is when control 0 must be disabled each frame.

#Vehicles and drive-bys

Drive-by aiming from a vehicle uses the vehicle camera, so the script switches the vehicle view mode instead. Some servers prefer to block drive-bys for drivers entirely; SetPlayerCanDoDriveBy(PlayerId(), false) does that.

#When a weapon looks wrong in first person

Add-on weapons sometimes sit oddly in first person — too close, clipping, or with a misaligned scope. Those offsets live in the weapon’s weapons.meta (the FirstPerson…Offset fields) and in the model itself. See weapons.meta explained.

Share this guideXRedditFacebook

Questions

How do I force first person when aiming in FiveM?
Store GetFollowPedCamViewMode(), call SetFollowPedCamViewMode(4) while aiming, and restore the stored mode when aiming stops.
What is view mode 4?
First person. Modes 0–2 are the three third-person distances.
How do I stop players pressing V to switch back?
Disable control 0 (INPUT_NEXT_CAMERA) every frame while aiming.
Does it work in vehicles?
Yes — use GetFollowVehicleCamViewMode and SetFollowVehicleCamViewMode when the player is in a vehicle.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read

Look it up while you work

The reference tables this guide leans on, free and without an account.