Garry's Mod

Garry's Mod

[TTT] Weapon Stats Changer
8 Comments
Gonzo 007 19 Apr @ 8:06am 
so how do i change it
Poxy_Clone 21 May, 2024 @ 11:20pm 
Thanks that helped better clarify what I needed to do. I was thinking I ran the convar as like some command to change a config file, but no I'm inserting the convar in the config to set it. That makes sense, and now I'm no longer having an issue. So TTT2 is cleared of any issues I claimed.
The Stig  [author] 21 May, 2024 @ 6:41pm 
Don’t have time to look into this atm, but yes, TTT2 is the bane of my existence, try removing it as see if that works, then I have a mod conflict to look into in the future.

The convars reset after manually changing them and switching maps because this mod in theory could create a ton of convars and blow up your server.vdf way too much.

What you have to do is first find the classname of the weapon you want to change (with the command in the guide I put on GitHub),
Then change the stat you want like _damage, or disable the weapon with _enabled 0,
Then put that line into your server’s server.cfg, or if you’re not using a dedicated server and just are hosting from the main menu of Gmod then put it into your Gmod install’s listenserver.cfg

Then on changing maps the stats and disabled guns will change, you don’t need to restart the server, but you do need to at least change to a different map for changes to take effect.
Poxy_Clone 20 May, 2024 @ 10:10pm 
I can't seem to get this work. I'm unfamiliar, and just trying figure out this stuff. When I use rcon with a convar to change the stats I then can see in the cvarlist that it has changed. Though the weapon stats do not apply. I figured maybe to restart the server, but no stat changes, and the cvar list says the stats are reverted. At first I didn't put the stuff into my server.cfg like you mentioned on your github, but even after inserting the base weapon list I couldn't get it to work.

I'am using TTT2 addon which I could see maybe causing some conflict. Otherwise I'm kinda lost on what to do. You mention this working for any weapon most likely, but in the github say to put the convar lists into the server.cfg. So would I need to create a something based on your convar examples for other untested addons for it to work?

I'm not sure if I've missed some step, but if your able to point me in the right direction of research. That'd be appreciated.
imendezr 7 Jan, 2024 @ 10:00pm 
Yeah thx
The Stig  [author] 7 Jan, 2024 @ 3:10pm 
Should be fixed
The Stig  [author] 7 Jan, 2024 @ 2:35pm 
@imendezr Ah yes I think I know what happened there let me look into it
imendezr 7 Jan, 2024 @ 2:08pm 
I got this error on my server:

[ulib] lua/autorun/stig_generic_weapon_changes.lua:76: attempt to index field 'Primary' (a nil value)
1. fn - lua/autorun/stig_generic_weapon_changes.lua:76
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109