Garry's Mod

Garry's Mod

57 ratings
Fun and/or useful commands in Garry's Mod
By XmegaaAAa
Hi here! :)
Here's another (useless) guide about somes fun and useful commands you may already have learned before! :)

BUT I remind you that I'm french so there would be some mistakes and typos, 'kay?

Good, let's get started!
   
Award
Favorite
Favorited
Unfavorite
Open console
I already made this part in the previous guide, but anyway, I'll do it once again :)

► Open Gmod
► Go to your settings
► In the controls tab (Where there's WASD and stuff) go to the very bottom of the window
► You'll see something named "Open developer console", double click on it to modify it
► Choose a key (I recommend ², ' or F1)
► Click "Apply"
► Close the window and press the key you just bound to. The console should open now.



Alright, that was quick.
the "Bind" command
This command is the most useful command ever in Garry's Mod lol. Almost everyone use it!

It enables you to binds keys on the keyboard or controller, hence its name.
Here's the syntax :

bind x "command"

First, u type bind (Easy, huh?) and then where there's the X letter, you can replace it with any keys u want (From A to Z, and even the functions ones : F1, F2, F3 ... F12)

and the quotes part, you choose the command you want to bind at the choosen key.


It's simple! You can for example bind this command : thirdperson
If you press the key you have choosen, it will enable the third person view. (In game, not in the main menu duh)

Here's more!
bind 4 "act dance"
bind g "incrementvar r_drawothermodels 1 2 1"
bind h "act wave; say Hi there!"

To bind multiples commands in one key, you have to separate them with a ;
Like in the third command above.
enable/disable a command on one key
Ignore this part if u're not a tough one with commands.
You may have noticed this weird "incrementvar" command you saw in the binds suggestions right before.

This command is as useful as the bind command.
Some people have to bind two commands to enable and disable, I understand, but some commands which uses the "cvars" (Numerical variables which determines the command state) can be enabled and disabled on ONE KEY

'kay, that's enough, here's an example :

incrementvar command here

the incrementvar command, contrary to the bind command, don't have to use quotations.
But, that's why this command should ALWAYS used with bind.

Syntax?
bind x "incrementvar your_command_here min max delta"

As previously, u can replace the X letter by something else.
In quotations, you have to type incrementvar and then you're desired command, and then the "worst" part : min, max and delta.

If you're a math genius, you may have noticed it's the abbreviation for minimal, maximal and the "delta" one is... Uh how do I explain that...

ANYWAY, u know what? here's another example damn... xD


(Still in french, please don't give a care 'bout that.)

The minimal is, obviously, the minimal number
The maximal is the maximal
And the Delta represents how much the variable will be incremented every time you press the key
I'm not losing anyone? 'kay here's a nutshell version :

If in delta I choose "5", everytime I press the bound key, the variable will be incremented by 5.
If I choose "12", it will be incremented by 12 every press.


If the maximal has been reached, the variable in any case will go back to the minimal.

Note that it's only working for the commands with variables (As known as cvars, which means "command variable")
Here's some commands you will like
I use these everytime I play Gmod, especially in Single Player (lol, that doens't means it's not working in multiplayer). Now I want to share them with you :

I put the command, and then right after I add a description of what it does :)

bind f3 "sv_cheats 1; buddha"
Enables game cheats and enables buddha mode, which means you lose HP, but can't go lower than 1 HP! :P It's a crucial step for some commands which required game cheats enabled!
bind F5 "thirdperson"
Game cheat!
Enable thirdperson view. To go back to normal, use firstperson
bind F6 "thirdperson_mayamode"
Game cheat!
Enable mayamode for thirdperson view, that means the camera will be locked in one angle. But don't enable this BEFORE enable thirdperson view, or the camera may be locked in one angle you don't want to. To fix that, just disable thirdperson_mayamode, and then re-enable it.
bind f7 "save quick"
Save your current session! Who needs the "make persistent" option anymore? :D
bind f8 "load quick"
Load your saved session with the previous command. Note that I don't think it's working in multiplayer.
bind 9 "givecurrentammo"
Game cheat!
Gives you the absolute maximal ammo for the weapon you're currently holding.
bind 0 "impulse 101"
Gives you all weapons from Half Life 2. If you have them, it gives you the ammos. Useful if you're not the admin, and want to use "givecurrentammo".
bind g "gmod_cleanup props; gm_spawn models/props_junk/sawblade001a.mdl"
Spawn a sawblade right where you're looking at and clears all props you spawned. That means if u try to spawn a second one by pressing the key, it will remove the previous one.
bind h "gm_spawn models/props_c17/oildrum001_explosive.mdl"
Spawn the explosive oildrum. This one isn't cleared if you press the key once again.
bind j "gm_spawn models/props_junk/gascan001a.mdl"
Spawn a gas can which ignite the entity it was thrown at (Gravity gun time! :D)
bind k gmod_cleanup props; gm_spawn models/props_c17/trappropeller_engine.mdl"
Spawn a heavy object, so heavy that even poison zombies (Which are the most resistant zombies) would be killed in one hit! (I think these commands will make the gravity gun more useful)
bind l "gmod_cleanup props; gm_spawn models/props_c17/trappropeller_blade.mdl"
Same as the sawblade before, but spawn the Ravenholm Spinning trap, which you can make massive damage if you throw it at someone! (The gravity gun is officially useful)
bind m "gmod_cleanup props; gm_spawn models/props_phx/amraam.mdl"
Spawn a missile... Well just beware if you try to shoot it or toss it to someone, 'cus its reach is really large! Or if the entity isn't killed, the explosion will ignite it!
bind o "incrementvar mat_yuv 0 1 1"
You're feeling nostalgic? You can play in black and white with this! Press once again to go back to the normal view.
bind x "incrementvar r_drawothermodels 1 2 1"
Game cheat!
Enable a sort of Xray. Really really really useful! ...And a lil bit cheating. Go troll you're friends with this when playing hide and seek.
bind , "incrementvar physgun_wheelspeed 10 9000 4500; incrementvar physcannon_maxforce 1500 3000 1500; incrementvar physcannon_maxmass 250 1000 735"
You'll love this one : If you press the key, you're physgun wheelspeed (You know, scrolling with the middle mouse boutton) will be 50x faster AND the gravity gun more powerful and can grab heavier objects! :)
Press once again to go back to normal.
bind p "say Damages increased!; sk_plr_dmg_ar2 22; sk_npc_dmg_ar2 22; sk_npc_dmg_buckshot 150; sk_plr_dmg_buckshot 500; sk_plr_dmg_357 900; sk_citizen_heal_player_delay 5; sk_citizen_heal_player 100"
Game cheat!
Make the AR2, Shotgun and Magnum 5x more powerful, and NPC overpowered. The medics can also heals you more often and at maximal!
bind = "gmod_mcore_test 1; mat_queue_mode -1; cl_threaded_bone_setup 1; say FPS boosted"
Increase you're game performances.

You guys can still change the key you want to bind. All of these are just examples! Feel free to add/remove/modify anything you want for you're own PVE or something! :)
WANT MORE!
If you want me to explain something or add something, I'll add them in this section. By the way, have fun with these next commands! :D I keep this usually updated!
Warning : Not bound with any keys for some! If yes, replace the X letter by the key of youre choice.

r_cleardecals
Clear all decals on the map (Bullet impacts, blood and stuff). I recommand to bind this to any key, and press it often, to avoid any potential lagg.
impulse 203
Game cheat!
Remove anything where you're looking at.
bind x npc_select npc_metropolice; npc_go; npc_select npc_metropolice
Game cheat!
Make all metropolice on the map to go where you were looking at when executing this command.
The selecting part is written twice in the command to unselect them.
Have fun making them go into you're trap!
ent_fire !picker ignite
Game cheat!
Ignite anything you're looking at (Under the crosshair)
ent_fire !picker becomeragdoll
Game cheat!
Make any NPC you're looking at becoming a stupid useless ragdoll. (Not working on players)
bind x "ent_fire !picker ignite; ent_fire !picker becomeragdoll"
Game cheat!
Both of the commands above. Make the NPC getting a sunburn.
ent_fire npc_strider setcannontarget !picker
Game cheat!
Make the strider(s) shoot with their supercannon (Whatever how it's called) the entity you're looking at.
bind x "npc_create_equipment weapon_ar2; npc_create npc_citizen"
Game cheat!
Create a citizen NPC equiped with an AR2.
bind x "npc_create_equipment weapon_rpg; npc_create npc_citizen"
Game cheat!
Create a citizen NPC equiped with a RPG.
bind x "incrementvar host_timescale 0.5 1 0.5"
Enable/Disable slow motion
npc_heal
Heal the NPC under the crosshair at his maximal HPs. And yes, it actually work.
bind x "incrementvar ai_disabled 0 1 1"
Enable/Disable thinking for all NPCs.
playsoundscape
Once you typed this command, a whole list of sounds should be displayed right below the text bar. Choose one and press enter. The sound should be played.
Note that these are ambient sounds.
ent_create grenade_ar2
Game cheat!
Create an explosion exactly where you're looking at, whatever the distance. But I don't think so that it's like you did the kill.
bind x "gm_spawn models/props_junk/gascan001a.mdl; ent_fire !picker ignite"
Game cheat!
Create a gas can already ignited! Beware by trying to spawn it below you, sometimes YOU will be ignited... (I hope this sort of glitch will be fixed...)
lua_run Entity(1):SetArmor(900) Entity(1):SetHealth(900) print('HP and Armor at 900')
Game cheat!
Set the player's health and armor to the maximal!
WARNING : If u try to use this in multiplayer, note that the "(1)" in the command is the player ID related to the players order in the Tab list. 1 represent the 1st player, 2 the 2nd player etc...
Don't touch in in singleplayer.
ent_create item_ammo_357_large; ent_create item_ammo_ar2_large; ent_create item_box_buckshot; ent_create item_ammo_crossbow
Spawn some ammos on ground for you and your friends for the next combine wave. xD
(Yes, you can run multiple commands in one like that without bind command.)
ent_create item_ammo_ar2_altfire; ent_create item_ammo_smg1_grenade; ent_create item_rpg_round; ent_create weapon_frag
Spawn some alternative and explosive ammos on ground for you and your friends for destroying the next enemy base.
incrementvar phys_pushscale 1 650 649
Game cheat!
Increase the physic pushing scale and make ragdolls completly illogic. Try shoot Dr. Breen in the head, and he will fly really far. Try to shoot him in the foot, and he will do freestyle into the air.
Better if you enable corpses.
Press once again to go back to normal.
lua_run Entity(1):EmitSound(Sound("music/hl2_song1.mp3"))
Plays a Half-Life 2 song. The game isn't needed to be mounted.
Write lua_run_cl instead of lua_run if u want the music plays only to you.
More infos here about this command.
host_timescale 1
Game cheat!
Enables the host player to change the timescale in the game. From 0.5 to 2, or idk...
All possibilities are possible. But please try this command at your own risks.
42 Comments
Bliksemtroy Apr 8, 2023 @ 8:58am 
is there a fizzle command
XmegaaAAa  [author] Sep 2, 2022 @ 8:11am 
The four digits in () there, I was trying to show you how it happens when you press the bound key.
Puppyjawz Aug 27, 2022 @ 1:38pm 
It's fine, thanks for your help. I don't mean to bother you too much, I'm just trying to figure it out.

What did you mean by the example you sent? There's 3 digits in the first and 4 in the second.
XmegaaAAa  [author] Aug 27, 2022 @ 11:48am 
I'm very sorry if I confuse you, once again it's been a while I wrote this guide, it's been a while I don't play Gmod overall. Like I said, trial and error is recommended to get what you want. I concur it looks like complicated, but it can be useful a lot once you master it. :physgun:
XmegaaAAa  [author] Aug 27, 2022 @ 11:48am 
Exemple :
incrementvar customcommand 0 9 3

It will go from 0 to 9, and it goes (0→3→6→9) every time you press the bound key. Once it's meant to reach higher than the max, it'll systematically goes back to the min and loops as you please. :steamthumbsup:
XmegaaAAa  [author] Aug 27, 2022 @ 11:47am 
Oof, it's been a while I no longer pay attention to commands in Gmod since I've been drawing over playing video games [www.instagram.com], but I will explain the best I can :

Yes, it increments each time with the delta var you choose when you press the bound key. You have to take note that incrementvar only works with commands that use one variable .
Puppyjawz Aug 27, 2022 @ 11:11am 
Could you give me an example of the incrementvar command? What's something simple that you would use the command in?
Puppyjawz Aug 27, 2022 @ 11:09am 
So what do the numbers mean in it? How does a maximum number and a minimum number play into something as simple and just pressing a key to toggle something (for example +right). I don't know how the numbers work, that's the main reason I don't understand it yet.
XmegaaAAa  [author] Aug 27, 2022 @ 10:31am 
incrementvar works like so :

incrementvar "your command here in quotes" var1 var2 delta

The first var is the minimum, the second var is the maximum, and the third var is the "delta" like they say, but in user-friendly terms, it's the amount which the var is incremented.
Once your var reaches the max, regardless of the delta's amount, it will always go back to 0 and restart again, unless they changed that tiny feature in one of the recent updates.

I encourage trial and errors! You will eventually get it working as you please!
Puppyjawz Aug 26, 2022 @ 11:20am 
Trying to understand how the incrementvar command works, mainly the numbers part of it anyway. Say I wanted to bind +right to it, how would I do that? Or is that not possible.