Raised This Month: $12 Target: $400
 3% 

[TF2] Halloween Gift Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Plugin ID:
2044
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Sets up a timer couting down for the Halloween gift
    Unapprover:
    Reason for Unapproving:
    Event is over.
    Old 10-30-2010 , 23:32   [TF2] Halloween Gift Timer
    Reply With Quote #1

    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
    Attached Files
    File Type: smx customtimer.smx (4.3 KB, 576 views)
    File Type: sp Get Plugin or Get Source (customtimer.sp - 529 views - 3.5 KB)
    __________________

    Last edited by FoxMulder; 11-01-2010 at 17:23.
    FoxMulder is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 10-31-2010 , 03:50   Re: [TF2] Halloween Gift Timer
    Reply With Quote #2

    Thats hilarious that you made that, as I had the exact same idea. Nice job :p
    __________________

    Last edited by retsam; 10-31-2010 at 03:52.
    retsam is offline
    crazydog
    AlliedModders Donor
    Join Date: Jan 2006
    Old 10-31-2010 , 06:14   Re: [TF2] Halloween Gift Timer
    Reply With Quote #3

    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.
    crazydog is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 10-31-2010 , 06:42   Re: [TF2] Halloween Gift Timer
    Reply With Quote #4

    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.
    __________________
    FoxMulder is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 10-31-2010 , 08:23   Re: [TF2] Halloween Gift Timer
    Reply With Quote #5

    Quote:
    Originally Posted by FoxMulder View Post
    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
    __________________
    asherkin is offline
    B!PP
    Member
    Join Date: Sep 2009
    Old 10-31-2010 , 13:32   Re: [TF2] Halloween Gift Timer
    Reply With Quote #6

    As soon as the plugin doent need any reset I put it on my Halloween server
    B!PP is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 10-31-2010 , 16:54   Re: [TF2] Halloween Gift Timer
    Reply With Quote #7

    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.
    __________________

    Last edited by FoxMulder; 10-31-2010 at 17:18.
    FoxMulder is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 10-31-2010 , 22:19   Re: [TF2] Halloween Gift Timer
    Reply With Quote #8

    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.
    __________________
    retsam is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 11-01-2010 , 05:13   Re: [TF2] Halloween Gift Timer
    Reply With Quote #9

    Added your suggestions
    __________________
    FoxMulder is offline
    helpiminabox
    Junior Member
    Join Date: Oct 2010
    Old 11-01-2010 , 06:16   Re: [TF2] Halloween Gift Timer
    Reply With Quote #10

    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.
    helpiminabox is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 22:25.


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