[Release] Accidental Punch

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)

When you tab out you click on the game to re-focus it and sometimes you can hit people because of that. If you add this you can’t punch unless you hold right-click and focus.
It also prevents shift punch spamming!

Dumb Install Hint: Add to any client.lua you can find

Press :heart: if helped.

19 Likes

Neat script but has its downsides much love <3

Way too simple (less than 20 lines of code) for a release, moved to tutorials section instead to serve as an example.

but this is not a tutorial, as I am not showing how to do it. It’s the actual script lines?!

Read the Releases section F.A.Q. and then try to tell me I’m wrong, please.

Thank you!

1 Like

Great one!
I wish this was included in every Five M server by default. Power punching (shift/sprint punching) is the most disgusting thing every loser can do in a melee fight.

1 Like

I need help installing please, can anyone help me please

Just paste this to a client.lua file somewhere. Example: QBCore Main Client