Garry's Mod

Garry's Mod

Quick melee attack
33 Comments
bitc0nfused 15 May, 2021 @ 11:20pm 
can you make a version of it to work with fists, or does this one already work and im just missing something?
[SFBOT] Sgt. K. Bassiclan 8 Nov, 2019 @ 8:11am 
Just tried out this addon and unfortunately I couldn’t get it to work for any of the Cw 2.0 weapons, even ones with very fast switch times.
"Technae" 10 Sep, 2019 @ 9:06am 
Lol, sorry, yes. I actually did that like 3 hours ago when I realized that's why you were sending people to the legacy version that is just a folder instead of a gma.

Also, I did it with the default gmod fists and it works perfectly, though it tends to always use the left fist which tbh isn't really a big deal.

Thanks for the response. :3
62  [author] 10 Sep, 2019 @ 9:03am 
You can also drag the file called "quick_melee_attack_465252635.gma" from your addons folder onto gmad.exe found in GarrysMod\bin folder and it will create the legacy version of any addon in your addons folder for you to edit.
"Technae" 10 Sep, 2019 @ 4:31am 
Heya, I need the legacy version but dropbox has a download limit? [imgur.com]

I want to use your legacy version of the mod to utilize the default fists in gmod instead as it seems like a more freehand action than taking out your crowbar.

Though gun melee actions would be kewl too if you know where to get those.
Mordecai 7 Nov, 2018 @ 11:36pm 
When i change the weapon deploy speed to 1.00 it cancels the crowbar attack
fozz 1 Jun, 2017 @ 9:17am 
OR JUST DO FAST WEAPON SWITCH ;)
milky-millwall fc 3 Nov, 2016 @ 12:44pm 
i jusc copid and pasted "mouse3" "crowbar_melee" then changed it to "mouse4" "crowbar_melee"
great thing
62  [author] 16 Sep, 2016 @ 11:55am 
What guns are you trying to make it work with? If there is a switching delay programmed into a swep it won't work
Lisan al-Ghaib 16 Sep, 2016 @ 11:30am 
Okay, But, Can you help Me? When i Try To Melee, It switches the crowbar and It Doesn't Attack?
62  [author] 16 Sep, 2016 @ 7:45am 
It's supposed to be -attack
Lisan al-Ghaib 16 Sep, 2016 @ 6:22am 
There's a Mistake on the Script, You Wrote "-Attack" Instead of "+Attack"
codyRay 18 Jul, 2015 @ 2:31am 
Ok thnx ißm guessing this also wrks w/4 and 5
62  [author] 17 Jul, 2015 @ 5:34pm 
Doesn't matter. I always put "s around both the key and the command.
codyRay 17 Jul, 2015 @ 8:28am 
Do i have to do it with the " when i want to bind it or not?
Epic Instincts 30 Jun, 2015 @ 11:21am 
So after some looking, i found the legacy version of the m9k knife. I think it would make a great addon myself, but inconceivable might not like that. I think its time to explore other options. Like make a specific knife swep thats simple and uses a model that can be published. Any ideas on making a knife swep? We could use css stuff right? Like you used the crowbar HL2, but of course theres no knife in HL. Fyi, i have all gmod mounts, except zeno clash and blade symphony.
Epic Instincts 30 Jun, 2015 @ 10:19am 
Ok ill find it and give that a try. Had it almost perfect but i had to attack after pulling out the knife for it to slash with the knife. Again, a million thanks for all the help, you the man!
62  [author] 30 Jun, 2015 @ 5:34am 
After that you can edit the three timers in my addon. Make the first one like 0.1, second 0.2 third 0.3 and it's gonna be insanely fast :P
62  [author] 30 Jun, 2015 @ 5:32am 
I got it attacking pretty fast with most sweps by removing the delay off the curtime. Don't wanna upload my m9k knife edit tho because m9k isn't my work. I'd recommend finding the legacy version of m9k specialties and editing the m9k_knife, looking for the swep:deploy function and lowing the curtime by removing the + 1
Epic Instincts 29 Jun, 2015 @ 3:28pm 
Excellent idea by the way. It made the difference on my end, but like i said, isee them but puts them away. Any other varibles in time either they just dont show or i get massive console errors.
Epic Instincts 29 Jun, 2015 @ 3:25pm 
Just got home and ive been wanting to get my hands pn this all day. Any ideas of how to make the knife attack faster. I have it totally working except, your right. he pulls out the knife for a mullisecond amd then just holsters! Dang it, so close Lord Gaben!
62  [author] 29 Jun, 2015 @ 4:33am 
You'd normally put a player class into a gamemodes lua files so that it gives you those weapons every time the player spawns but you could do it so it gives you weapons when you run this script yeah.

Just above the "if ply:HasWeapon( "m9k_knife" )" bit put:

ply:Give( "m9k_knife" )
ply:Give( "m9k_sig_p229r" )

Now, the first time you press the bind it will give you those two weapons and when you press it again it'll do the attack with the knife
Epic Instincts 29 Jun, 2015 @ 3:27am 
Ok, so now that I have pulled an all nighter on this dang knife mod lol. Would it be possible to create a code that automatically gives you a pistol and a knife, and then bind the knife to its on function to be used as a melee? Seems like the two would work better together if they were coded togther originaly, like a player class? Sorry if im bothering you, I want this so bad. Doesnt seem like it should be this hard to add feature thats in almost every game now lol.
62  [author] 29 Jun, 2015 @ 3:14am 
for example here:

timer.Create( randomtimername .. "one", 0.4, 1, function()

All code inside this timer executes after 0.4 seconds has passed. Too quick for you to switch to the knife so it needs to be higher.
62  [author] 29 Jun, 2015 @ 3:08am 
Yeah the knife has an arming time before you can use it so it messes up coz it can't switch weapon or attack while its arming
Epic Instincts 29 Jun, 2015 @ 1:42am 
I think im going to try and perfect it, i brushed up on lua code since that last post and its got me up all late. Im deterrmined to see it work. So just to be clear. Open the lua file you gave me and open in notepad++. Copy mk9_knife over the three weapon_crowbars and save and im done? Doesnt work, wierd. Thats all i change right. Im using an xbox one controller and i enter in the console, bind stick2 crowbar_melee. My loadout always gives me a sigp229r and the knife, do i need a crowbar for this to work?
62  [author] 29 Jun, 2015 @ 1:17am 
Oops yeah weapon_crowbar not quick_crowbar and yeah I wanted to use the m9k knife for this addon but when you pull it up it takes too long before it's possible to attack with it so these timers are too short you'll have to edit them too. It'll end up being pretty slow unless you edit the m9k_knife coding too.
Epic Instincts 28 Jun, 2015 @ 6:29pm 
Ok, when you say codename, you model name right? FYI Im trying the mk9 knife and when i pull up the weapon_loadouts file it just refers to it as mk9_knife... So should i put mk9_knife where you said to replace quick_crowbar? Did you mean "weapon_crowbar". Dang it, im confused sorry.
Epic Instincts 28 Jun, 2015 @ 5:26pm 
Wow. This has made my day man. Im all over this. I really want to thank you for helping me like you did, honestly never expected a response lol. Any tips on where to start learning lua language? Now, thanks to you of course, im knee deep in ideas for this feature and would love to bring them to life. Thanks again.
62  [author] 28 Jun, 2015 @ 3:03pm 
Put some instructions for changing it in the description. Feel free to ask if you get stuck.
Epic Instincts 28 Jun, 2015 @ 2:19pm 
Thanks for getting back to me Gaben, im trying to google it, but im not sure which code. Dont wanna sound like a noob, but i have basically put gmod down for good because of the lack of a quick melee feature. If you could point me in the right direction, I would greatly appreciate it.
62  [author] 28 Jun, 2015 @ 1:19pm 
Not without changing the code. If you do, just replace where it says weapon_crowbar with the new ones name
Epic Instincts 27 Jun, 2015 @ 2:51pm 
hey bruh, absolutely great addon. searched everywhere for this. anyway to change crowbar to something else?