Garry's Mod

Garry's Mod

54 avaliações
How to remove weapons from current hotbar?
Por 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?
5
   
Premiar
+ favoritos
Nos favoritos
- favoritos
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 '♥♥♥ 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, '♥♥♥ 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.
20 comentário(s)
defjuss 12/mai./2024 às 4:46 
Hey, is there a way to deactivate the tools permanent?
berriz44 14/abr./2024 às 0:13 
I feel like the France is among us
roadkyl49 4/fev./2023 às 23:39 
yeah, it's leaving me with the smg and shotgun, I've tried entering the commands and they don't work
ozone 23/dez./2022 às 19:41 
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 às 15:28 
ooooorrr just install custom loadout
XmegaaAAa  [autor(a)] 10/jun./2022 às 10:38 
Yep, I know. It's already stated in the weapon scripted name list.
SirSmoss 1/jun./2022 às 22:31 
the tool gun and camera actually have the prefix Gmod,

Gmod_tool
Gmod_Camera
XmegaaAAa  [autor(a)] 2/jul./2021 às 12:51 
:physgun: I'm glad this little guide could help you ^^