Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Coffee Cup Hunt [FEATURE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Realism
File Size
Posted
Updated
373.868 KB
2 Jul, 2020 @ 7:44am
19 Jun, 2021 @ 7:50am
6 Change Notes ( view )

Subscribe to download
[TTT2] Coffee Cup Hunt [FEATURE]

In 1 collection by Tim | Mineotopia
[OFFICIAL] TTT2 Basics - World
9 items
Description
Coffee is delicious! No wonder that finding a cup of it improves your points in the scoreboard.

Discord: https://discord.gg/Npcbb4W
Source: https://github.com/TTT-2/ttt2-coffeecup (report issues here)

Searching for these rare coffee cups is the perfect thing to do for all these innocent terrists. It gives them something todo besides dying. Picking them up with 'E' grants the finder instantly 3 points. The spawnrate and the reward size are configurable with convars.

The idea is from this addon. However the original version only works together with pointshop and the fixed version doesn't seem to work at all. Therefore I created a new version of this that also makes use of the many TTT2 features like targetID and MStack. While creating this addon, no code from the original was reused.

You have to use TTT2 for this addon to work.




All convars can be set via ULX. But if you prefer to do it the classic way, here is a list of them:

# set the amount of coffee cups that spawn each round ttt_coffeecup_amount[0..n] (default: 2) # the reward size per found coffee cup ttt_coffeecup_reward_size[0..n] (default: 3) # the coffecup mode defines which type of points are grated # 1 - score points, 2 - credits, 3 - PointShop points, 4 - PointShop premium points ttt_coffeecup_reward_mode[1..4] (default: 1)

--
Credits:
Mineotopia: creator of this addon
21 Comments
Tim | Mineotopia  [author] 20 Feb, 2021 @ 11:30am 
It is now 16 bit, so up to 65535
Tim | Mineotopia  [author] 20 Feb, 2021 @ 11:27am 
Ah, yes, I only support values up to 255, I did not anticipate this. I'll udate it right now
Lyrel 20 Feb, 2021 @ 11:25am 
It works! It awards the correct amount of points but the only issue is that it displays the wrong value in the top and is usually very low. I made it give me 1000 points but it said 232 and 9999 says 15. The points system usually works with quite high values such as 500 is a very low value and 10000 is quite a bit
Tim | Mineotopia  [author] 19 Feb, 2021 @ 10:57am 
@dscottwilson:
TTT2 just got updated. The coffecups should work now
Tim | Mineotopia  [author] 18 Feb, 2021 @ 11:39pm 
See my comment about TTT2
Lyrel 18 Feb, 2021 @ 1:40pm 
Seems to be an issue. Whenever I try to pick up a cup, it does nothing other than spit out a Lua error on the server but it might just be what you were talking about in your previous comment:

[[TTT2] Coffee Cup Hunt [FEATURE]] lua/terrortown/events/coffeecup.lua:11: attempt to call method 'AddAffectedPlayers' (a nil value)
1. Trigger - lua/terrortown/events/coffeecup.lua:11
2. Trigger - lua/ttt2/libraries/events.lua:178
3. PickupCup - lua/terrortown/autorun/shared/sh_coffecup_handler.lua:82
4. unknown - gamemodes/terrortown/entities/entities/ent_ttt_coffeecup/shared.lua:29
Lyrel 17 Feb, 2021 @ 11:14am 
Thank you! I'll give it a try later today
Tim | Mineotopia  [author] 16 Feb, 2021 @ 7:49am 
@dscottwilson:
I added pointshop support. I haven't tested it, please report back!
Tim | Mineotopia  [author] 8 Feb, 2021 @ 1:40am 
There currently is a bug that prevents you from picking up coffeecups. This bug is on the TTT2 side and already fixed in dev. You'll have to wait for 0.8.1b
Tim | Mineotopia  [author] 7 Feb, 2021 @ 6:35am 
Thanks! BUt I want to get back into TTT2 development because I haven't done much for TTT2 in the last few months