Camera shake and aim sway for FiveM weapons
ShakeGameplayCam(name, intensity) starts a named shake such as HAND_SHAKE or DRUNK_SHAKE; SetGameplayCamShakeAmplitude changes its strength and StopGameplayCamShaking(true) ends it. Per-weapon firing shake comes from weapons.meta fields like RecoilShakeHash and RecoilShakeAmplitude. Use gentle, short shakes tied to gameplay (stamina, injuries) and let players aim through them.
Camera shake makes weapons feel heavy — or unbearable. A little hand sway after sprinting rewards careful play; too much makes players motion-sick. FiveM gives you two levers: the recoil shake defined per weapon in weapons.meta, and script-driven shakes through ShakeGameplayCam.

#Built-in shake names
| Shake | Feel |
|---|---|
HAND_SHAKE | Subtle handheld sway |
DRUNK_SHAKE | Slow, heavy wobble |
JOLT_SHAKE | Short hit |
VIBRATE_SHAKE | Fast vibration |
ROAD_VIBRATION_SHAKE | Driving rumble |
SMALL_ / MEDIUM_ / LARGE_EXPLOSION_SHAKE | Explosion impacts |
SKY_DIVING_SHAKE | Free-fall buffeting |
FAMILY5_DRUG_TRIP_SHAKE | Strong drug effect |
DEATH_FAIL_IN_EFFECT_SHAKE | Death screen |
#Aim sway after sprinting
local lastSprint = 0
local shaking = false
CreateThread(function()
while true do
local sleep = 250
local ped = PlayerPedId()
if IsPedSprinting(ped) then lastSprint = GetGameTimer() end
local tired = GetGameTimer() - lastSprint < 4000
local aiming = IsPlayerFreeAiming(PlayerId())
if aiming and tired and not shaking then
ShakeGameplayCam('HAND_SHAKE', 0.6)
shaking = true
elseif (not aiming or not tired) and shaking then
StopGameplayCamShaking(true)
shaking = false
end
if aiming then sleep = 100 end
Wait(sleep)
end
end)Start the shake once and stop it once — calling ShakeGameplayCam every frame restarts it and looks jittery.
#Injury and effect shakes
- Low health:
HAND_SHAKEwhose amplitude rises as health falls (SetGameplayCamShakeAmplitude). - Drunk or drugged:
DRUNK_SHAKEwith the matching timecycle modifier. - Nearby explosion: a short
SMALL_EXPLOSION_SHAKEscaled by distance.
#Firing shake in weapons.meta
| Field | Controls |
|---|---|
RecoilShakeHash | The camera shake played when firing in third person |
RecoilShakeHashFirstPerson | The shake used in first person |
RecoilShakeAmplitude | Strength of that shake |
MinTimeBetweenRecoilShakes | Minimum gap between shakes (ms) |
Lowering RecoilShakeAmplitude gives a steadier view without changing where bullets go. Real recoil (the camera kick) is a script or pattern — see the recoil script guide — and spread is AccuracySpread. Field details are in weapons.meta explained.
#Removing shake
StopGameplayCamShaking(true) stops script shakes immediately. For firing shake, edit the weapon meta or stream a meta override. Offer players a calmer option if your server is shake-heavy — accessibility keeps people around.
Questions
How do I add camera shake in FiveM?
ShakeGameplayCam('HAND_SHAKE', 0.5) (or another shake name) and stop it with StopGameplayCamShaking(true).How do I change the strength of a running shake?
SetGameplayCamShakeAmplitude(value) while it runs.Where does weapon firing shake come from?
weapons.meta: RecoilShakeHash, RecoilShakeHashFirstPerson and RecoilShakeAmplitude.Is camera shake the same as recoil?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.
Relevant to what you just read