AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [TF2] Halloween Gift Timer (https://forums.alliedmods.net/showthread.php?t=141968)

FoxMulder 10-30-2010 23:32

[TF2] Halloween Gift Timer
 
3 Attachment(s)
Halloween Gift Timer

What's it do?
Shows a timer counting down for next gift spawn. When the timer reaches 0 it goes blank until a user finds the gift.

Requirements:

BackpackHook is required

Updates:
Code:

11/1/2010
 -Added RetSam's suggestions.
 -Timer only runs for the cp_manor_event
 -Timer is displayed to dead clients as well

 -When 10s are left it plays announcer_attention
 -When it reaches 3 it starts the count down announcement
 -Shows message when player count drops less than 10

http://www.rtdgaming.com/screenshots/gifttimer01.jpg

retsam 10-31-2010 03:50

Re: [TF2] Halloween Gift Timer
 
Thats hilarious that you made that, as I had the exact same idea. Nice job :p

crazydog 10-31-2010 06:14

Re: [TF2] Halloween Gift Timer
 
Isn't there an event for someone finding an item? Couldn't you check if it's one of the halloween masks? Although I'm not aware if you can tell the difference between a present and a trade.

Looks like item_found does all those things
http://wiki.alliedmods.net/Team_Fort...nts#item_found

I know that the item isn't found right when the present is picked up, but it's gonna be the closest you'll get, so it's a good place to start.

FoxMulder 10-31-2010 06:42

Re: [TF2] Halloween Gift Timer
 
No not really. I've seen people not "find" the gift until many minutes later because they either have not died or as soon as they grab the gift they go AFK.

asherkin 10-31-2010 08:23

Re: [TF2] Halloween Gift Timer
 
Quote:

Originally Posted by FoxMulder (Post 1338132)
No not really. I've seen people not "find" the gift until many minutes later because they either have not died or as soon as they grab the gift they go AFK.

Which is why BackpackHook exists :P

B!PP 10-31-2010 13:32

Re: [TF2] Halloween Gift Timer
 
As soon as the plugin doent need any reset I put it on my Halloween server :)

FoxMulder 10-31-2010 16:54

Re: [TF2] Halloween Gift Timer
 
asherkin Thanks so much, the plugin is now fully automatic! It also looks like gifts don't spawn during Setup they wait about 5 seconds or so and then they spawn.

retsam 10-31-2010 22:19

Re: [TF2] Halloween Gift Timer
 
Couple things I changed in mine:

I added a mapcheck just so the timer isnt run if its not manor.

Code:

public OnMapStart()
{
    decl String:sMapname[128];
    GetCurrentMap(sMapname, sizeof(sMapname));
    //LogAction(0, -1, "Current Map Detected as: %s", sMapname);
    if(strcmp(sMapname, "cp_manor_event") == 0)
    {
    CreateTimer(1.0, ShowTimer, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
  }
}

I also took off the alive check in the callback so dead players can also see the present timer. I dont think theres a reason to prevent dead players from seeing the timer is there? I didnt think so.

FoxMulder 11-01-2010 05:13

Re: [TF2] Halloween Gift Timer
 
Added your suggestions

helpiminabox 11-01-2010 06:16

Re: [TF2] Halloween Gift Timer
 
Would it be possible to have the timer pause if suddenly there are less than the required number of people? As it was on a friends server, someone disconnected for a very short time but came back, the ETA kept running, and the present appeared about the same time he was gone afterwards. If that makes sense. At least that's my theory on how the present drop system works.


All times are GMT -4. The time now is 14:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.