Disable Close Combat / Pistol Whipping

Looking for a script to disable the “pistol whipping” action when you go to hit something or reload near another player. This is extremely annoying when role playing or playing with friends you don’t want to accidently kill.

Thanks!

3 Likes

I would love for this script to be made. It is an extremely annoying thing to happen when role playing, like Deziel said.

Plz explani what you exactlly mean I do not even know what you mean about this action, so maybe I could help you then :wink:

1 Like

@Yashiku said in Disable Close Combat / Pistol Whipping:

Plz explani what you exactlly mean I do not even know what you mean about this action, so maybe I could help you then :wink:

In game if you are near another player and reload your weapon, you will pistol whip them, killing them. Same goes if you are using any melee weapons to hit something near another player.

3 Likes

@deziel0495 Ah ok thanks no I’m in normally this is easy.
I got a Idea but could not test it because currently I only developing at localhost and there is no other player =/

But you simply need a query which include if a player is on reload the Damage have to be canceled, maybe some one has already written something like that.

As soon as possible I look if it is that simple I guess

1 Like

@Yashiku said in Disable Close Combat / Pistol Whipping:

@deziel0495 Ah ok thanks no I’m in normally this is easy.
I got a Idea but could not test it because currently I only developing at localhost and there is no other player =/

But you simply need a query which include if a player is on reload the Damage have to be canceled, maybe some one has already written something like that.

As soon as possible I look if it is that simple I guess

Thanks. A search didn’t turn up any results so I don’t believe it exists. Appreciate your help.

@deziel0495 I just read something and testsomething on Ped in GTA and I guess this is what your want :slight_smile:

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(5) -- A Short Daily of 5 MS
		DisableControlAction(0, 140, true) -- Disable the Light Dmg Contr ol
	end
end)

This Disables the Light Damage Control when you press the R Button on full mag
I Hope this will help you :slight_smile:

4 Likes

@Yashiku said in Disable Close Combat / Pistol Whipping:

@deziel0495 I just read something and testsomething on Ped in GTA and I guess this is what your want :slight_smile:

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(5) -- A Short Daily of 5 MS
		DisableControlAction(0, 140, true) -- Disable the Light Dmg Contr ol
	end
end)

This Disables the Light Damage Control when you press the R Button on full mag
I Hope this will help you :slight_smile:

Thanks! Can I have some more info as to what the values do and where to place the code? I think I put it in the right place: resources/fivem/fivem_client.lua.

No one online to test it with at the moment. I’ll let you know my findings.

2 Likes

Basically just found on lcpdfr.com what I’m asking for here: http://www.lcpdfr.com/files/file/12593-realistic-melee

Although it’s client sided, if it works I’m happy. Would still prefer server sided code however.

2 Likes

@deziel0495 paste it in your client.lua file :slight_smile:
It starts until you load the script :wink:

You could also set the no reload to on xd

4 Likes

@Boss said in Disable Close Combat / Pistol Whipping:

You could also set the no reload to on xd

True, never thought of that. Also, if you set another player as “friendly” through the enhanced reborn trainer, would it disable this similar to GTA online?

2 Likes

@deziel0495 Not sure, since Ehanced FiveReborn is not developed by ourselfs. You’ll have to try it.

@Boss said in Disable Close Combat / Pistol Whipping:

@deziel0495 Not sure, since Ehanced FiveReborn is not developed by ourselfs. You’ll have to try it.

Confirming that marking someone as friendly does nothing.

@Yashiku said in Disable Close Combat / Pistol Whipping:

@deziel0495 I just read something and testsomething on Ped in GTA and I guess this is what your want :slight_smile:

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(5) -- A Short Daily of 5 MS
		DisableControlAction(0, 140, true) -- Disable the Light Dmg Contr ol
	end
end)

This Disables the Light Damage Control when you press the R Button on full mag
I Hope this will help you :slight_smile:

Got around to trying this with friends and it does not work.

1 Like

@deziel0495 Are you sure you got it at the right place?
Back to your Problem. I thought it was if you just press the “r” Key you wipe someone your gun in his face, which kills the guys instant, am I right? Or does it also triggers if you are on reloading your Weapon?

This Code Snippet normaly should fix it, it had test it with some random pets on my own server and I only could use the R Button if my mag is empty.

@Yashiku said in Disable Close Combat / Pistol Whipping:

@deziel0495 Are you sure you got it at the right place?
Back to your Problem. I thought it was if you just press the “r” Key you wipe someone your gun in his face, which kills the guys instant, am I right? Or does it also triggers if you are on reloading your Weapon?

This Code Snippet normaly should fix it, it had test it with some random pets on my own server and I only could use the R Button if my mag is empty.

Yes that is what I mean and yes it also does it when reloading. The link I listed above for the mod on LCPDFR works perfectly on the pistol and stun gun, but it is not applied to the other weapons, and I don’t know how to do that myself. I’d be OK with having it client side and not server side.

1 Like

Can someone help me please i when i taser someone i kill them and it piss me off

2 Likes

@Deziel0495 the links provided dont work anymore, is this script not available anymore?

2 Likes