Garry's Mod

Garry's Mod

58 ratings
How to remove weapons from current hotbar?
By XmegaaAAa
Here's a (useless?) guide to let people know how to remove weapons from the current hotbar in Garry's Mod without any addons, using only the console.
Note that it can be done with any other weapons from addons (SwEPs and stuff)

This is my very first guide, so I hope it won't be that bad ^^'

I already see some of you typing in the comments like Why you're making this guide? We can already disable weapons on spawn! This is completly useless!

Yeah, that's true, BUT it won't remove the physgun, and it disable ALL weapons, so I make this guide for those who wanna remove SPECIFICS weapons, including physic gun!
Yeah, now you don't know what to say know, huh punk?
6
   
Award
Favorite
Favorited
Unfavorite
Open the console
How to talk about something using the console without telling how to open the console?

Here's how to open it!

• First, you have to go in your settings where you made your keybinds for moving, (You know, WASD and other things like that...)
Go to the very bottom of the window, and you'll see Open developer console or something like that, bind it to a key 'cus by default it's empty. (I recommend to bind it to F10 or ²)

• Now, if you press the key you just bound to open the console, it should be opened now!

I know, sorry I'm french :) but don't worry about that.
Here's how the console looks like.
Which command to type?
Now that you know how to open the console (By the way when you want to open it, it pause automatically the game), we now have to type a specific command to remove weapons from hotbar.

First of all, you may need to type this if you're on a server : sv_cheats 1
on Singleplayer, it works perfectly without.

You're on a map, and for example you want to remove you're shotgun from your hotbar, here's what to do.


Go into the console, and type this :
ent_remove weapon_shotgun


If you want to remove the weapon from your hotbar including the ones landing on ground, add _all and it should give this :
ent_remove_all weapon_shotgun

Here's a greatly useful tip : If you want to know the "scripted name" of the weapon (For example here the scripted name of the shotgun is "weapon_shotgun"), you can go into you're spawn menu, go to the weapon tab, and right-click the weapon you want to know the scripted name, and "copy to clipboard".
Now go back to the console, type the begining of the command, and when you have to type the name, paste the name! :) Ctrl + V

Press enter and now if you wander in your hotbar with the middle mouse button, you'll see that you no longer have the shotgun!

It also works with the physic gun!
ent_remove weapon_physgun

Note that you can't remove several weapons at a time (Or am I missing something?).
All scripted name of all weapons
These are only for default weapons, not the addon ones.
It sounds logical, 'cus I don't have the sames addons as you.

Physic gun : weapon_physgun
Crowbar : weapon_crowbar
Stunstick : weapon_stunstick
Gravity gun : weapon_physcannon
9mm Pistol : weapon_pistol
357 Magnum : weapon_357
SMG : weapon_smg1
AR2 : weapon_ar2
Shotgun : weapon_shotgun
Crossbow : weapon_crossbow
Grenades : weapon_frag
RPG : weapon_rpg
Slams : weapon_slam
Camera : gmod_camera
Toolgun : gmod_tool

Yeah, the proof that it also works with toolgun, physgun and camera! :D

If you want to know the name of another weapon (Mostly from another addon) you still can right click it and copy it to clipboard, then paste its name, that's all! :)

I hope I helped anyone with this guide! ^^

Bonus
You can make the reversed way : Instead of removing, giving the desired weapon!

All you have to do is the same thing, but instead of ent_remove (Or ent_remove_all) you just type :
give weapon_name
Replace the "name" by the corresponding one of the weapon you want
It gives the weapon to the one who typed the command. But you can't give to another player.
And you can't for NPCs too, duh.
19 Comments
LEMONTECH 22 Jul @ 4:01am 
thanks
defjuss 12 May, 2024 @ 4:46am 
Hey, is there a way to deactivate the tools permanent?
berriz44 14 Apr, 2024 @ 12:13am 
I feel like the France is among us
roadkyl49 4 Feb, 2023 @ 11:39pm 
yeah, it's leaving me with the smg and shotgun, I've tried entering the commands and they don't work
ozone 23 Dec, 2022 @ 7:41pm 
there is a way to bind one key to remove them all if you use the alias function.

copy and paste this into your autoexec.cfg file
alias removeAll_1 "ent_remove weapon_physgun;ent_remove weapon_crowbar;ent_remove weapon_stunstick;ent_remove weapon_physcannon;ent_remove weapon_pistol;ent_remove weapon_357;ent_remove weapon_smg1;ent_remove weapon_ar2;ent_remove weapon_shotgun"
alias removeAll_2 "ent_remove weapon_crossbow;ent_remove weapon_frag;ent_remove weapon_rpg;ent_remove weapon_slam;ent_remove gmod_camera;ent_remove gmod_tool"
bind = "removeAll_1; removeAll_2"
pivot 8 Jul, 2022 @ 3:28pm 
ooooorrr just install custom loadout
XmegaaAAa  [author] 10 Jun, 2022 @ 10:38am 
Yep, I know. It's already stated in the weapon scripted name list.
SirSmoss 1 Jun, 2022 @ 10:31pm 
the tool gun and camera actually have the prefix Gmod,

Gmod_tool
Gmod_Camera
XmegaaAAa  [author] 2 Jul, 2021 @ 12:51pm 
:physgun: I'm glad this little guide could help you ^^
Quambo 2 Jul, 2021 @ 1:39am 
Thanks! I needed this to find the name of the camera.

I just set up my game to cut out a lot of looking through tools.

First I unbinded the numbers from the weapons and rebinded them to toolmodes, like: bind 2 "gmod_toolmode weld"

The names of the tools I wanted were hard to find. They are: weld, wire_adv, wire_namer, wire_gates, colour, material, advdupe2, smart_remover (addon), constraintremover (addon)

It's cool! So much less going through menus.

You still have to mousewheel to the toolgun, so then I removed all of the weapons except toolgun and physgun (just removing the crowbar and gravity gun works fine, tho)