Garry's Mod

Garry's Mod

197 ratings
Clear Inventory Command
5
3
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build
File Size
Posted
Updated
1.527 KB
9 Apr, 2016 @ 3:30am
25 Sep, 2022 @ 8:40am
4 Change Notes ( view )

Subscribe to download
Clear Inventory Command

Description
This is a little addon for Garry's Mod that will add a command 'clear_inv', 'clear_inv_non_essential' and 'clear_current_weapon' that when executed in the console will wipe you inventory.

Commands:
'clear_inv' - Will clear the whole inventory
'clear_inv_non_essential' - Will clear every weapon other than the Physics gun and Tool gun.
'clear_current_weapon' - Will clear the current weapon the player is holding.

These commands can also be bound to your keyboard, e.g 'bind KP_MULTIPLY <command>', upon pressing the key (e.g 'KP_MULTIPLY') it will execute this command. For a list of keys you can view valves docs: https://developer.valvesoftware.com/wiki/Bind

This addon is really for personal and was my attempt at getting into lua but as a programmer and a member of the community I wanted to share this with you in case anyone finds it useful.

As a side note, this addon was created in 2016 and I didn't expect anyone to use it, this is a feature from the comments but i'm glad after 4+ years the code still hangs in there.

Thanks for viewing :)
37 Comments
Dum_Potat 17 Jul @ 9:15am 
Heck yeah! Very nice addon
( λ ) Hidden 27 Jan @ 3:01pm 
Can you add an option to strip ammo too?
DZshot 4 Jan @ 6:36am 
Can it be able to clear other players' inventory as you are the host?
J 28 Dec, 2023 @ 3:40am 
God bless you
Wide Claude 4 Oct, 2023 @ 9:25pm 
You're a lifesaver ong
WesleyPlaysGames 18 Apr, 2023 @ 1:51am 
godspeed you are a lifesaviour
pioloon 30 Mar, 2023 @ 8:59am 
just what I needed
TotoReste 10 Feb, 2023 @ 2:26am 
this is what i am searching for thank you!
Pikasatupu75 25 Sep, 2022 @ 8:52am 
You are a godsend
ThatsOurJake  [author] 25 Sep, 2022 @ 8:42am 
Now able to clear the current players weapon :lunar2019piginablanket: