Garry's Mod

Garry's Mod

Not enough ratings
[TTT/2] Disguiser for Custom Playermodels
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun
File Size
Posted
Updated
7.090 KB
16 Sep, 2021 @ 10:22pm
16 Jun, 2024 @ 3:27am
17 Change Notes ( view )

Subscribe to download
[TTT/2] Disguiser for Custom Playermodels

In 1 collection by The Stig
The Stig's TTT Mod List
275 items
Description
Makes the default TTT disguiser work with custom playermodels.

It now gives you a random player's model when you enable the disguise!


ttt_disguiser_disable_for_spy_role 1
Whether the Spy role from Custom Roles for TTT should be unable buy and use the disguiser

ttt_disguiser_purchase_message 1
Whether the 'Press numpad enter' message is shown on purchase
Popular Discussions View All (1)
0
15 Aug, 2024 @ 10:03am
Name while i disguise
Masaki.K
7 Comments
Nikey 16 Jun, 2024 @ 3:55am 
Yes, now everything works as intended and thanks for the Convar addition:selike:
The Stig  [author] 16 Jun, 2024 @ 3:31am 
@Nikey So the key bit of information I was missing was TTT2 also has a role called the Spy, https://steamproxy.com/sharedfiles/filedetails/?id=1683708655 so that's why I couldn't reproduce the error with just TTT2 base installed.

So my check for if the Spy role existed was still triggering, and TTT2 borks anything to do with passive items, so it didn't like me trying to access the EquipmentItems table where passive items are normally stored. Should be fine now I'm explicitly checking for the Custom Roles version of the Spy role.

I also added ttt_disguiser_purchase_message 0 which should disable the purchase messages.
Nikey 15 Jun, 2024 @ 5:35pm 
You can now buy the TTT2 - Passives again. But the Error at the beginning of the round persists.
Oh and can you add a convar, so the Text (After Purchase) of the Disguiser can be disabled?

[TTT2 (Base) - v0.13.2b]
[TTT2][WARNING] You are using an add-on that is trying to access an unsupported var ('26'). This will lead to errors!

1. __index - gamemodes/terrortown/gamemode/shared/sh_equip_items.lua:52
2. fn - lua/autorun/disguiser_custom_playermodels.lua:10
3. Run - lua/ulib/shared/hook.lua:109
4. RoundStateChange - gamemodes/terrortown/gamemode/client/cl_main.lua:521
5. func - gamemodes/terrortown/gamemode/client/cl_main.lua:621
6. unknown - lua/includes/extensions/net.lua:38
The Stig  [author] 15 Jun, 2024 @ 5:30am 
@Nikey Not quite, looks like this only affects passive items made for TTT2, e.g. radar still works.

Have to check if the passed ID is a string or not because TTT2 adds new passive items, with strings for IDs instead of numbers... See if it's working for you now after the latest update.
Nikey 10 Jun, 2024 @ 9:10am 
While it does indeed work, it causes Issues with the TTT2 - Base, preventing you from buying any passive Traitoritem. It will give you the following Errormessage when, you try to buy a Passive Item (Like No Prop Damage) or when the Round starts. Woulb be nice if you could fix it. Eventhough the Addon is pretty old by now.

[TTT2][WARNING] You are using an add-on that is trying to access an unsupported var ('26'). This will lead to errors!

1. __index - gamemodes/terrortown/gamemode/shared/sh_equip_items.lua:52
2. fn - lua/autorun/disguiser_custom_playermodels.lua:10
3. Run - lua/ulib/shared/hook.lua:109
4. RoundStateChange - gamemodes/terrortown/gamemode/client/cl_main.lua:521
5. func - gamemodes/terrortown/gamemode/client/cl_main.lua:621
6. unknown - lua/includes/extensions/net.lua:38
The Stig  [author] 9 Apr, 2022 @ 2:18am 
@Selbod Try running TTT without any mods at all, it should be available for traitors to buy.
Selbod 8 Apr, 2022 @ 2:24pm 
Does this work with the advanced disguiser too? Because I cannot find a 'default' version...