Garry's Mod

Garry's Mod

27 ratings
[TTT/2] Prop Disguiser Improved
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun
File Size
Posted
Updated
164.074 KB
Jun 12, 2020 @ 5:52am
Jan 9, 2022 @ 4:51am
5 Change Notes ( view )

Subscribe to download
[TTT/2] Prop Disguiser Improved

Description
Original post

Changes
► Prop has half of player's hp (50hp before).
► After leaving the disguise player's hp will be returned correctly (100hp before).
► Player can no longer drop weapon during disguise.
► Convars added with ulx support.
► Working Icon (Thank AlgeeTwice).

Usage
Right-click: Disguise
Left-click: Leave Disguise
R: Change Prop (if valid)

Convars
ttt_prop_disguiser_time (original: 25, default: 10)
ttt_prop_disguiser_cooldown (original: 2, default: 30)
ttt_prop_disguiser_min_prop_size (original: 5, default: 5)
ttt_prop_disguiser_max_prop_size (original: 100, default: 100)

NOTE:
Player can still go outside the map or may get stuck in other props.

Check TTT2
7 Comments
tin pot Dec 26, 2023 @ 11:58am 
does it work on sandbox
DR. EGGMAN Jun 23, 2023 @ 6:40am 
Hello again, just an extension to my earlier comment, it seems like this addon doesn't seem to apply the edited convars in the listenserver.cfg properly due to the convars potentially being changed too "early".
For example, when I set the ttt_prop_disguiser_cooldown to 10 in the .cfg file and open up the game, the console will state that the cooldown value is 10 yet when I use the item the cooldown will actually be 30 seconds instead.
How the conclusion of the convars not applied properly due to being changed too "early" is due to how when the convar is changed in-game via console, it successfully adjusts the cooldown value, albeit you'd have to adjust it to something else than 10 in my case initially since I presume the game thinks it's already at a value of 10 (e.g. Cant change the cooldown to 10 seconds after setting it to 10 in the .cfg file, but I can set it back to 10 successfully after setting it to anything else other than 10 first.)
DR. EGGMAN Jun 21, 2023 @ 1:05am 
Hello, the convars don't seem to work. I set the disguiser time to 15 and the cooldown to 7 in my listenserver.cfg and it remains as 10 second disguiser time and a 30 second cooldown. I checked console for the ttt_prop_disguiser_time and the ttt_prop_disguiser_cooldown and it confirms it is 15 and 7.
Malivil Nov 5, 2022 @ 5:24am 
Looks like I'm still getting that same error occasionally
Malivil Jan 9, 2022 @ 5:54am 
Thanks for taking a look. I'll keep an eye on it and let you know if I see any other problems with it =)
Perwex  [author] Jan 9, 2022 @ 4:56am 
I removed timer after death/round end so it doesn't break. However I feel like it might break some things because I am not original author of this code and I don't have my environment to test it.
Malivil Jan 8, 2022 @ 2:11pm 
Hello =)

Occasionally I get these errors when using the prop disguiser which causes the player to not have the PD_Disguised NWBool reset. I've seen the same effect when a player is killed while disuised or when the round ends while a player is disguised, but it doesn't happen every time.

[[TTT/2] Prop Disguiser Improved] lua/weapons/weapon_ttt_prop_disguiser.lua:115: attempt to call method 'PropUnDisguise' (a nil value)
1. unknown - lua/weapons/weapon_ttt_prop_disguiser.lua:115

Timer Failed! [STEAM_0:0:24550179_DisguiseTime][@lua/weapons/weapon_ttt_prop_disguiser.lua (line 112)]

[[TTT/2] Prop Disguiser Improved] lua/weapons/weapon_ttt_prop_disguiser.lua:68: bad argument #1 to 'Send' (Entity expected, got nil)
1. Send - [C]:-1
2. PD_Msg - lua/weapons/weapon_ttt_prop_disguiser.lua:68
3. unknown - lua/weapons/weapon_ttt_prop_disguiser.lua:95