Garry's Mod - console commands to set entity keyvalues aren't working

In Half-Life 2, there is a gun for the Airboat. I wanted to play with this in Garry's Mod, so I tried enabling the gun through keyvalues, like you would in Hammer Editor. There is an EnableGun
boolean keyvalue, so I tried using console commands to enable the gun. I spawned an Airboat through the spawnmenu (under vehicles), pointed my crosshair at it, and typed:
ent_setname "airboatandgun"
ent_keyvalue "airboatandgun" "EnableGun" "1"
This did not enable the gun. I thought maybe you couldn't access the gun like you could in HL2, so I tried this:
ent_keyvalue "model" "models/balloons/balloon_star.mdl"
This did not set the model. I tried enabling cheats, duplicating the entity, and reloading (although this removed all the entities.) Neither the airboat gun nor the new model appeared.
Am I doing something wrong? HL2 is properly mounted to Garry's Mod. Is the Airboat in Garry's Mod different than the one in Half-Life 2, or does the command not work at all?
Best Answer
I believe you download that from the steam workshop it is HL2 Vehicles with guns P.S the mounted gun is just for decoration unless you get the workshop item
Pictures about "Garry's Mod - console commands to set entity keyvalues aren't working"



How do I enable commands in GMOD?
How to Open the ConsoleHow do I use developer console in GMOD?
#1How do you bind a numpad key in GMOD?
To use the console commands press the ~ on your key board and a console screen should pop up and then type the code in the type section. -note: this can only be used in single player mode. Plus you need to type sv_cheats 1 to make this work.Garry - Flam Se Ta Da [Video Oficial] Álbum “Novo Ciclo“ 2022
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Daniel Eliashevsky, Kyle Loftus, cottonbro, Kyle Loftus