Garry's Mod

Garry's Mod

551 ratings
[TTT/2|Sandbox] Sandwich (Medkit)
   
Award
Favorite
Favorited
Unfavorite
Type: Weapon, Addon
Tags: Fun, Cartoon
File Size
Posted
Updated
2.123 MB
Mar 14, 2016 @ 9:31pm
Jul 5 @ 6:04pm
10 Change Notes ( view )

Subscribe to download
[TTT/2|Sandbox] Sandwich (Medkit)

In 1 collection by Zaratusa
[TTT/2] Equipment Collection
22 items
Description
Features
The sandwich is a simple Medkit for Traitors and Detectives (configurable via ConVars), it heals 25 (configurable) life per use and can either be used on yourself or every other player. Primary attack to heal other player, secondary attack to heal yourself. The three-second rule applies, after you have dropped it on the gound, it will spoil and after some time it can even damage/kill you.

Type: Equip2
Ammo: None
Magazine: 4/4 (configurable)

Sandbox Category: Food

Working view and world model! Also includes an individual .vmt and .vtf weapon icon as well.



ConVars
# Should Detectives be able to buy the Sandwich? ttt_sandwich_detective [0/1] (default: 1) # Should Traitors be able to buy the Sandwich? ttt_sandwich_traitor [0/1] (default: 1) # Amount of sandwiches you receive, when you buy a Sandwich. ttt_sandwich_bought [1..n] (default: 2) # Maximum amount of sandwiches you can carry. ttt_sandwich_max [1..n] (default: 5) # Can you buy the Sandwich only once per round? ttt_sandwich_limited_stock [0/1] (default: 1) # Amount of health being restored upon consumption. ttt_sandwich_heal_amount [1..n] (default: 25)

Note: You have to restart your map/server after changing one of these values to take effect.

Server Infos
Add it to your server by following this guide: Workshop for Dedicated Servers[wiki.facepunch.com]
You can add "sandwich_name" and "sandwich_desc" to your translation file, to translate this addon.

Source
The whole source code can be found on GitHub[github.com], feel free to contribute. The Model and Sounds were taken from TF2. I agree to remove this item if Valve wishes to.

Thanks for reading, enjoy and have fun!
< >
20 Comments
Yeah finaly sandwich with no olive
Степашенька Nov 24, 2019 @ 9:49am 
Thanks, i have fun.
Doshdex Feb 1, 2019 @ 10:09am 
BONK please
♫Joe Blaze♫ Dec 16, 2018 @ 1:14am 
Three second rule is BS. Food can stay good for a whole day.
Death [moat.gg] Sep 13, 2018 @ 8:10pm 
what is the weapon code of the sandwich for the buy menu. trying to make a auto buy bind
The Doom Master Mar 17, 2018 @ 2:07pm 
Heavy's sandvich!
dick palmer Jan 25, 2018 @ 6:59am 
can you somehow change the amount of the healing that you get?
_LenX_ Jan 26, 2017 @ 6:18am 
can you make a config for this sandwich to have like 10 uses or infinite in sandbox ?
Kenny Nov 8, 2016 @ 6:38am 
True true, a lil rusty have not done server stuff in half a year lol I forget easily and thanks!
Zaratusa  [author] Nov 8, 2016 @ 6:37am 
Another advice: When you use the workshop for your downloads as described in the "Server Infos" section you have nearly always max download speeds...