Garry's Mod

Garry's Mod

30 ratings
TTT Golden Gun (D Weapon) for Custom Roles
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
File Size
Posted
Updated
5.061 MB
10 Apr, 2020 @ 9:55am
3 May @ 6:32pm
29 Change Notes ( view )

Subscribe to download
TTT Golden Gun (D Weapon) for Custom Roles

Description
Thanks to Jenssons for the original version of this mod.

Edits (and replaces) the original version to add compatibility with Custom Roles for TTT

This Golden Deagle has 2 bullets (by default) when purchased but will automatically empty itself when you successfully hit a player. That means you have 2 (by default) chances to hit at most one time.

ConVars
ttt_gdeagle_ammo 2 // The amount of ammunition the gun should have by default ttt_gdeagle_simplified 0 // Whether the simplified shoot logic should be used ttt_gdeagle_killer_damage 35 // The amount of damage the shooter and target Killer take ttt_gdeagle_vampire_heal 50 // The amount of health the target Vampire will regain if they are damaged ttt_gdeagle_vampire_overheal 25 // The amount of health the target Vampire will be over-healed to if they are healthy. For example, if they are already at 100 health, they will increase to 125 instead.

What Happens When Each Role is Shot
This only applies when ttt_gdeagle_simplified is 0.

Phantom
The shooter is set on fire for 5 seconds.

Killer
Both the shooter and the target lose a configurable amount of health (see ttt_gdeagle_killer_damage ConVar).

Zombie
The shooter is turned into a Zombie thrall.

Vampire
The shooter is killed instantly and turned into a pile of bones. The vampire is healed by a configurable amount (see ttt_gdeagle_vampire_heal ConVar) if they are hurt or over-healed by a configurable amount (see ttt_gdeagle_vampire_overheal ConVar) if they are already healthy.

Drunk
The drunk instantly sobers up and remembers what their role is.

Bodysnatcher
The bodysnatcher switches roles (and role weapons) with the player who shot them

Beggar
The beggar joins the opposite team of the player who shot them (or a random team if shot by a Jester or Independent)

Traitor Team
The target is killed instantly.

Innocent Team
The shooter is killed instantly.

Jester Team
Both the shooter and the target are killed instantly. The Jester does not win the round.

Independent Team
Set the shooter's health to the target's health, if it's less than 100. Then restore the target's max health to at least 100 and fully heal them.

Monster Team (Other than Zombie and Vampire)
Set's the shooter's role to be the same as the target's role

What Happens When Each Role is Shot (Simplified)
This only applies when ttt_gdeagle_simplified is 1.

Traitor Team
The target is killed instantly.

Innocent Team
The shooter is killed instantly.

Monster Team
The target is killed instantly.

Independent Team
The target is killed instantly.

Jester Team
Nothing happens.

Special Thanks:
  • Jenssons for the original version of this mod
  • Silky for the code used to create the pile of bones after the Vampire is shot taken from the 'TTT Traitor Weapon Evolve' mod
  • Jarren from Achievement Hunter for the idea for the gun having 2 bullets but draining remaining ammo when you hit a player
  • The Stig for adding convars for ammo count and simplified shoot logic

Source Code:
https://github.com/Malivil/TTT-Golden-Gun
7 Comments
Malivil  [author] 29 Jun, 2021 @ 6:52am 
I have updated the dependencies of this to point to the new Custom Roles for TTT because it is the new standard Custom Roles for TTT version.
Malivil  [author] 4 Sep, 2020 @ 4:39am 
All of my addons are replacements
MBgov1133 4 Sep, 2020 @ 4:36am 
Do I need the original golden gun installed for this to work, or does it replace it like most of your other addons?
BinaryChaos 22 Jul, 2020 @ 6:34pm 
Haha that's what I thought xD
DUDE you fixed this literally within an hour you are the beeest!
Malivil  [author] 22 Jul, 2020 @ 5:00pm 
Would you believe me if I told you I never miss and that's why I didn't know about that error?
Really, though, thanks for report it! It should be fixed in the new version.
BinaryChaos 22 Jul, 2020 @ 3:51pm 
This mod is great! but if you miss and hit anything that isn't a player (like the map) it sends an error in the server
"attempt to call global 'SendFullStateUpdate' (a nil value)"
Loken05 1 May, 2020 @ 11:24am 
good