Garry's Mod

Garry's Mod

118 ratings
TTT: Lootable Props - Chance for items to drop when breaking crates
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
File Size
Posted
1.124 KB
27 Mar, 2016 @ 11:05am
1 Change Note ( view )

Subscribe to download
TTT: Lootable Props - Chance for items to drop when breaking crates

Description
This addon adds a chance for ammunition and weapons to drop from breakable props upon breaking them. It is made for the Trouble In Terrorist Town gamemode. It should be compatible with all custom items from other addons, as long as the item is set to be automatically spawnable.

It is highly configurable, allowing you to customize the addon to fit your needs:

ttt_lootable_weapon_drop_chance - The percentage chance for the item in the prop to be a weapon. Set to 0 to disable. Default is 0.

ttt_lootable_drop_chance - The percentage chance for a prop to drop an item upon breaking it. Default is 33.

ttt_lootable_enabled - If set to 1, the TTT Lootable addon is enabled. Default is 1.

ttt_lootable_max_items_per_prop - The maximum number of items that can be dropped per prop. Default is 1.

ttt_lootable_only_appropriate_props - If set to 1, items can only be dropped from appropiate props like crates, drawers and drums. Default is 1.
11 Comments
Jiyū to anzen 17 Jun @ 4:19pm 
we need a fixed sandbox version
Corvatile 22 Nov, 2023 @ 3:34pm 
Seems to spawn items no matter what prop gets broken now, not just crates. I think it worked fine before.
Snorps 22 Feb, 2022 @ 9:49am 
Really doesn't look amateur to me, though the code has had all it's line breaks removed.
Estrogen Enjoyer 28 Feb, 2019 @ 10:22am 
hey, this shits broken and the code isnt spaced at all. It's returning a bunch of nil values linking back to the create functions of the script but I can't find it because it looks like an amateur coder vomited on this .lua
Lunatic Cultist 20 Jan, 2018 @ 4:07pm 
omly in TTT?
Zya The Real Infestor 18 Jul, 2017 @ 11:30am 
Make for Sandbox pls
Maxpowerammo 22 May, 2017 @ 11:59pm 
Could you make a version for Sandbox?
Bob 31 Oct, 2016 @ 5:49pm 
I know this was intended for TTT but, its still launchable on SandBox (See the first comment for error log).
Apparently; Trying to to create an entity 'entsCreate(l) tries to create an entity called l which returns 'nil'. Should be a string for (l) apparently. Could you help us up? Maybe Create a separate addon? Thanks in advance.
Postino 2 Sep, 2016 @ 7:01am 
You say that ttt_lootable_only_appropriate_props is set to 1 by default, yet when I break watermelons ammo shows up? It's a great addon, by the way.
S.D.U AUS 22 Aug, 2016 @ 9:20am 
;-; i hoped it would work in sandbox