[Code Snippet] Fix Spam Punch

Spam blows, yes, that’s what happens a lot on people’s servers, here I will provide code to solve this problem.

Add the code below in any script (Free)

Citizen.CreateThread(function()
   while true do
   Citizen.Wait(0)
   DisableControlAction(1, 140, true)
   if not IsPlayerTargettingAnything(PlayerId()) then
   DisableControlAction(1, 141, true)
   DisableControlAction(1, 142, true)
   end
  end
end

Video Preview : HOW TO FIX SPAM PUNCH - Youtube

More Code Snippet :