Skip to content

Instantly share code, notes, and snippets.

@FacuM
Created September 3, 2019 04:35
Show Gist options
  • Save FacuM/8504189b86537afcca5adb33fbb2a8db to your computer and use it in GitHub Desktop.
Save FacuM/8504189b86537afcca5adb33fbb2a8db to your computer and use it in GitHub Desktop.
Disable NPCs for GTA V's FiveM.
Citizen.CreateThread(function()
local player = PlayerPedId()
while true do
SetPedDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
SetPoliceIgnorePlayer(player, true)
SetDispatchCopsForPlayer(player, false)
Citizen.Wait(1)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment