[STANDALONE] Remove pistol-whipping, melee and nighstick damage

Simple script that removes pistol-whipping, melee damage and nightstick damage.
If you wish to add more weapons to the script, it is very easy to do so, just follow the examples, but, if you want to add more than 3, i recommend you to create a dictionary inside it.
This is my first public release, if you have any questions or ideas, let me know.


Simples script que remove dano de coronhada, socos e cassetete.
Se caso quiser adicionar mais armas ao script, é muito fácil o fazer, só seguir os exemplos, mas, caso queira adicionar mais de 3 armas, recomendo que crie um dicionário.
Esse é meu primeiro release público, se tiver alguma dúvida ou ideia, me avise.

12 Likes

Nice work man!!!

1 Like

Works well ! Great job !
Here is my version :slight_smile:

Citizen.CreateThread(function()
    while true do
    	N_0x4757f00bc6323cfe(GetHashKey("WEAPON_NIGHTSTICK"), 0.1) 
        Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("WEAPON_BAT"), 0.23)
        Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("WEAPON_HAMMER"), 0.23)
        Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("WEAPON_HAMMER"), 0.23)
        Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("WEAPON_GOLFCLUB "), 0.23)
        Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("WEAPON_CROWBAR"), 0.23)
        Wait(0)
    end
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
	local ped = PlayerPedId()
        if IsPedArmed(ped, 6) then
	       DisableControlAction(1, 140, true)
       	   DisableControlAction(1, 141, true)
           DisableControlAction(1, 142, true)
        end
    end
end)

3 Likes

Nice!!

1 Like

so this removes the dmg of the listed weapons, im wondering is there a value in there to simply reduce the damage, i have been looking for a way to increase all the players hitpoints to make them less squishie, but if i could add all the weapons in the game and cut the damage by 50% or more that would be pretty much the same thing.

Why hammer twice? I tried to change the 2nd hammer to flashlight and i get this - SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed.
InvokeNative: execution failed: Argument at index 1 was null
when I stop this resource it stops posting this in console but when its running it posts every 2-5 seconds any idea ?

Yes, there is. In this specific script, when i say “Removed damage”, i mean that the damage is now 0, but you can reduce it to 50% just fine.

Hmm… I believe i did it in order to chance both hammers damage… I need to see the specific part that you changed in order for me to help you out.
Thanks.

1 Like

this is what mine looks like now all i did was change a hammer to flashlight -

Citizen.CreateThread(function() while true do N_0x4757f00bc6323cfe(GetHashKey(“WEAPON_NIGHTSTICK”), 0.1) Wait(0) N_0x4757f00bc6323cfe(GetHashKey(“WEAPON_BAT”), 0.23) Wait(0) N_0x4757f00bc6323cfe(GetHashKey(“WEAPON_HAMMER”), 0.23) Wait(0) N_0x4757f00bc6323cfe(GetHashKey(“WEAPON_FLASHLIGHT”), 0.23) Wait(0) N_0x4757f00bc6323cfe(GetHashKey("WEAPON_GOLFCLUB "), 0.23) Wait(0) N_0x4757f00bc6323cfe(GetHashKey(“WEAPON_CROWBAR”), 0.23) Wait(0) end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) local ped = PlayerPedId() if IsPedArmed(ped, 6) then DisableControlAction(1, 140, true) DisableControlAction(1, 141, true) DisableControlAction(1, 142, true) end end end)

The flashlight weapon hash exists? Because i just did a little digging and found no flashlight weapon hash, prob the game sees that as a attachment rather than a weapon itself, and if that is the case, then this script won’t satisfy your needs… Sorry for that. You can find all the weapons below;

----------------Weapons----------------
WEAPON_UNARMED = 0xA2719263,2725352035
WEAPON_ANIMAL = 0xF9FBAEBE,4194021054
WEAPON_COUGAR = 0x08D4BE52,148160082
WEAPON_KNIFE = 0x99B507EA,2578778090
WEAPON_NIGHTSTICK = 0x678B81B1,1737195953
WEAPON_HAMMER = 0x4E875F73,1317494643
WEAPON_BAT = 0x958A4A8F,2508868239
WEAPON_GOLFCLUB = 0x440E4788,1141786504
WEAPON_CROWBAR = 0x84BD7BFD,2227010557
WEAPON_PISTOL = 0x1B06D571,453432689
WEAPON_COMBATPISTOL = 0x5EF9FEC4,1593441988
WEAPON_APPISTOL = 0x22D8FE39,584646201
WEAPON_PISTOL50 = 0x99AEEB3B,2578377531
WEAPON_MICROSMG = 0x13532244,324215364
WEAPON_SMG = 0x2BE6766B,736523883
WEAPON_ASSAULTSMG = 0xEFE7E2DF,4024951519
WEAPON_ASSAULTRIFLE = 0xBFEFFF6D,3220176749
WEAPON_CARBINERIFLE = 0x83BF0278,2210333304
WEAPON_ADVANCEDRIFLE = 0xAF113F99,2937143193
WEAPON_MG = 0x9D07F764,2634544996
WEAPON_COMBATMG = 0x7FD62962,2144741730
WEAPON_PUMPSHOTGUN = 0x1D073A89,487013001
WEAPON_SAWNOFFSHOTGUN = 0x7846A318,2017895192
WEAPON_ASSAULTSHOTGUN = 0xE284C527,3800352039
WEAPON_BULLPUPSHOTGUN = 0x9D61E50F,2640438543
WEAPON_STUNGUN = 0x3656C8C1,911657153
WEAPON_SNIPERRIFLE = 0x05FC3C11,100416529
WEAPON_HEAVYSNIPER = 0x0C472FE2,205991906
WEAPON_REMOTESNIPER = 0x33058E22,856002082
WEAPON_GRENADELAUNCHER = 0xA284510B,2726580491
WEAPON_GRENADELAUNCHER_SMOKE = 0x4DD2DC56,1305664598
WEAPON_RPG = 0xB1CA77B1,2982836145
WEAPON_PASSENGER_ROCKET = 0x166218FF,375527679
WEAPON_AIRSTRIKE_ROCKET = 0x13579279,324506233
WEAPON_STINGER = 0x687652CE,1752584910
WEAPON_MINIGUN = 0x42BF8A85,1119849093
WEAPON_GRENADE = 0x93E220BD,2481070269
WEAPON_STICKYBOMB = 0x2C3731D9,741814745
WEAPON_SMOKEGRENADE = 0xFDBC8A50,4256991824
WEAPON_BZGAS = 0xA0973D5E,2694266206
WEAPON_MOLOTOV = 0x24B17070,615608432
WEAPON_FIREEXTINGUISHER = 0x060EC506,101631238
WEAPON_PETROLCAN = 0x34A67B97,883325847
WEAPON_DIGISCANNER = 0xFDBADCED,4256881901
WEAPON_BRIEFCASE = 0x88C78EB7,2294779575
WEAPON_BRIEFCASE_02 = 0x01B79F17,28811031
WEAPON_BALL = 0x23C9F95C,600439132
WEAPON_FLARE = 0x497FACC3,1233104067
WEAPON_VEHICLE_ROCKET = 0xBEFDC581,3204302209
WEAPON_BARBED_WIRE = 0x48E7B178,1223143800
WEAPON_DROWNING = 0xFF58C4FB,4284007675
WEAPON_DROWNING_IN_VEHICLE = 0x736F5990,1936677264
WEAPON_BLEEDING = 0x8B7333FB,2339582971
WEAPON_ELECTRIC_FENCE = 0x92BD4EBB,2461879995
WEAPON_EXPLOSION = 0x2024F4E8,539292904
WEAPON_FALL = 0xCDC174B0,3452007600
WEAPON_EXHAUSTION = 0x364A29EC,910830060
WEAPON_HIT_BY_WATER_CANNON = 0xCC34325E,3425972830
WEAPON_RAMMED_BY_CAR = 0x07FC7D7A,133987706
WEAPON_RUN_OVER_BY_CAR = 0xA36D413E,2741846334
WEAPON_HELI_CRASH = 0x145F1012,341774354
WEAPON_FIRE = 0xDF8E89EB,3750660587

Do you mean as in weapon_flashlight? Its hash is 0x8BB05FD7

1 Like

that is excatly why…

whats does {Wait(0)} Do?

He awaits 0 milliseconds before running the next line.

Just needed this for the mele with weapons part. Thanks!

This is actually really sick. I love the creativity in this script, simple and basic. I like it. Good shit!

I have a question would this work?


----------------------------------------------------------------------------
--DANO ARMAS (E SOCO) MELEE ///// MELEE AND WEAPONS DAMAGE 
----------------------------------------------------------------------------
Citizen.CreateThread(function()
    while true do
	N_0x4757f00bc6323cfe(GetHashKey("weapon_unarmed"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("WEAPON_NIGHTSTICK"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_dagger"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bat"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bottle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_crowbar"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_flashlight"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_golfclub"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_hammer"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_hatchet"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_knuckle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_knife"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_wrench"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_battleaxe"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_poolcue"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_stone_hatchet"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pistol_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_combatpistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_appistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_stungun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pistol50"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_snspistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_snspistol_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_heavypistol"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_vintagepistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_flaregun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_marksmanpistol"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_revolver"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_revolver_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_doubleaction"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_microsmg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_smg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_smg_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_assaultsmg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_combatpdw"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_machinepistol"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_minismg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_raycarbine"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pumpshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pumpshotgun_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_sawnoffshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_assaultshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bullpupshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_musket"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_heavyshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_dbshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_autoshotgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_combatshotgun"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_assaultrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_assaultrifle_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_carbinerifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_carbinerifle_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_advancedrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_specialcarbine"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_specialcarbine_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bullpuprifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bullpuprifle_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_compactrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_militaryrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_mg"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_combatmg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_combatmg_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_gusenberg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_sniperrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_heavysniper"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_heavysniper_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_marksmanrifle"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_marksmanrifle_mk2"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_rpg"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_grenadelauncher"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_grenadelauncher_smoke"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_minigun"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_firework"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_railgun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_hominglauncher"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_compactlauncher"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_rayminigun"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_grenade"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_bzgas"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_molotov"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_stickybomb"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_proxmine"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_snowball"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_pipebomb"), 0.1) 
    	Wait(0)
    	N_0x4757f00bc6323cfe(GetHashKey("weapon_ball"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_smokegrenade"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_flare"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_petrolcan"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("gadget_parachute"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_fireextinguisher"), 0.1) 
    	Wait(0)
        N_0x4757f00bc6323cfe(GetHashKey("weapon_hazardcan"), 0.1) 
    	Wait(0)
    end
end)
----------------------------------------------------------------------------
--DANO CORONHADA //// PISTOL WHIPPING
----------------------------------------------------------------------------
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
	local ped = PlayerPedId()
        if IsPedArmed(ped, 6) then
	   DisableControlAction(1, 140, true)
       	   DisableControlAction(1, 141, true)
           DisableControlAction(1, 142, true)
        end
    end
end)

Any way to make it work for vehicle weapons too?

WEAPON_COUGAR is in fact a “vehicle weapon” supposedly.
I tried to put it into the script but it didn’t work.

Any idea how to decrease their damage?