Adding real recoil to FiveM weapons
While the player is armed, check IsPedShooting(ped) every frame; when they fire, raise the camera with SetGameplayCamRelativePitch(GetGameplayCamRelativePitch() + kick, 0.2) using a per-weapon kick value. Skip the loop entirely when unarmed, handle first person and vehicles separately, and keep kick values small. weapons.meta recoil shake is visual only; the script changes where the player aims.
Vanilla GTA V guns barely move the aim, which makes sustained automatic fire a laser beam. Roleplay servers add recoil so a firefight takes skill and a rifle feels different from a pistol. Recoil in FiveM is a client script that nudges the camera upward every time the player fires. Done well it is subtle and weapon-specific; done badly it costs frames and fights the player’s mouse.

#How scripted recoil works
The game tells you each frame whether the ped fired (IsPedShooting). When it did, you tilt the gameplay camera up by a small amount. Because the bullet goes where the camera points, the next shot lands higher unless the player pulls down — which is recoil control.
#A clean recoil script
local KICK = {
[`WEAPON_PISTOL`] = 0.35,
[`WEAPON_COMBATPISTOL`] = 0.40,
[`WEAPON_PISTOL50`] = 0.90,
[`WEAPON_SMG`] = 0.35,
[`WEAPON_CARBINERIFLE`] = 0.55,
[`WEAPON_ASSAULTRIFLE`] = 0.65,
[`WEAPON_PUMPSHOTGUN`] = 1.40,
}
local DEFAULT_KICK = 0.45
CreateThread(function()
while true do
local ped = PlayerPedId()
local _, weapon = GetCurrentPedWeapon(ped, true)
if weapon == `WEAPON_UNARMED` or IsPedInAnyVehicle(ped, false) then
Wait(500) -- nothing to do: check rarely
else
if IsPedShooting(ped) then
local kick = KICK[weapon] or DEFAULT_KICK
if GetFollowPedCamViewMode() == 4 then -- first person
kick = kick * 0.8
end
SetGameplayCamRelativePitch(GetGameplayCamRelativePitch() + kick, 0.2)
end
Wait(0)
end
end
end)- Backtick hashes make the table keys match
GetCurrentPedWeapondirectly. - The loop sleeps 500 ms when unarmed, so the cost is only paid while holding a gun.
- View mode 4 is first person; the example reduces kick there because the view is closer.
- Addon weapons fall back to
DEFAULT_KICKunless you add them.
#Tuning by class
| Class | Kick per shot (degrees) | Feel |
|---|---|---|
| Pistols | 0.3 – 0.5 | Quick, controllable |
| Heavy pistols / revolvers | 0.8 – 1.2 | One strong kick per shot |
| SMGs | 0.3 – 0.45 | Low per shot, adds up fast |
| Rifles | 0.5 – 0.7 | Needs pulling down on full auto |
| Shotguns | 1.2 – 2.0 | Big kick, low fire rate |
| Snipers | 1.5 – 2.5 | Scope jumps after each shot |
Recoil interacts with damage and accuracy: a server with high recoil can afford higher damage because hits are harder. See weapon balance for roleplay.
#Vehicles and drive-bys
The example skips vehicles. Shooting from a car uses different cameras, and adding pitch there tends to feel wrong. Servers that want drive-by recoil usually use a smaller value and apply it only while aiming in a vehicle.
#Script recoil vs weapons.meta shake
weapons.meta has RecoilShakeHash, RecoilShakeHashFirstPerson and RecoilShakeAmplitude. Those produce a camera shake for feel, but the aim returns to where it was. A recoil script moves the aim itself. Many servers use both: meta shake for feel, script for control. The fields are explained in weapons.meta explained. The recoil fields themselves live in weapons.meta, and FAM Tools has an editor for it.
Questions
How do I add recoil in FiveM?
IsPedShooting(ped) and raises the camera with SetGameplayCamRelativePitch by a small per-weapon amount.Does a recoil script lower performance?
Is recoil server-side?
What is the difference between recoil and camera shake?
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.
- All 921 vehicle spawn namesEvery vanilla model with a picture, its display name, its class and the hash CreateVehicle takes.
- All 860 ped model namesEvery model GetHashKey resolves, with its hash and how many clothing components and props it carries.
- The same tables as JSON and CSVFree downloads, CORS open, no account and no API key — ship the list inside your own resource instead of scraping a page.