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

Timecycle


Post New Thread Reply   
 
Thread Tools Display Modes
Author
crazydog
AlliedModders Donor
Join Date: Jan 2006
Plugin ID:
1675
Plugin Version:
1.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Sets mapcycle depending on the date and time
    Unapprover:
    Reason for Unapproving:
    Duplicate.
    Old 05-19-2010 , 03:30   Timecycle
    Reply With Quote #1

    Description:
    This plugin will change the mapcyclefile variable at the end of the map to a value determined by the date and time. It is useful if you want to change the mapcycle depending on the time of day, or if you want to have more control over what maps show up in votes during different times of day.

    Installation:
    1) Upload timecycle.smx to addons/sourcemod/plugins/
    2) Navigate to MOD/cfg/sourcemod/timecycle. You will see 7 folders, one for each day of the week. If you use sm_timecycle_daily = 1, your mapcycles must go inside those folders. If you use sm_timecycle_daily = 0, your mapcycles must stay in the /timecycle/ folder.
    3) To create the mapcycles, create as many files as you need, depending on when you want the mapcycles to change, named xx.txt (where xx is the hour in 24 hour format. i.e. 01.txt 13.txt, 22.txt, etc.)

    Cvars:
    sm_timecycle_interval - Number of hours between mapcycle updates. For example, if set to 2, the mapcycle will only change every two hours. (Default = 1)
    sm_timecycle_daily - Should the plugin use a different set of mapcycles for each day (1=yes 0=no)? (Default = 0)

    Notes:
    -If the plugin cannot find the mapcycle for the current time, it will keep the previous mapcycle.
    -I haven't tested the plugin extensively, so please report any bugs you might find!

    Changelog:
    Code:
    1.1
     - Set mapcycle on server startup (will be mapcycle.txt if the current day/day+hour doesn't have a mapcycle).
    1.0
     - Initial Release
    Attached Files
    File Type: sp Get Plugin or Get Source (timecycle.sp - 405 views - 2.2 KB)

    Last edited by crazydog; 05-20-2010 at 04:29.
    crazydog is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 05-19-2010 , 07:37   Re: Timecycle
    Reply With Quote #2

    Can't this already be easily done with the existing 'cron' plugins by just putting "mapcyclefile file.txt" as the command?
    psychonic is offline
    crazydog
    AlliedModders Donor
    Join Date: Jan 2006
    Old 05-19-2010 , 17:31   Re: Timecycle
    Reply With Quote #3

    I guess, but I wasn't thinking about those when I thought about needing this function on a server.
    crazydog is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 05-19-2010 , 17:47   Re: Timecycle
    Reply With Quote #4

    There is only 2 cron plugins that uses date and time. But hey what do you know, none of them working properly that could change mapcycle
    __________________
    shustas is offline
    crazydog
    AlliedModders Donor
    Join Date: Jan 2006
    Old 05-19-2010 , 19:50   Re: Timecycle
    Reply With Quote #5

    I believe that's because for sourcemod to recognize the mapcycle changed (i.e. for listmaps to show the maps), you need to have the nextmap plugin reload.
    crazydog is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 05-19-2010 , 20:18   Re: Timecycle
    Reply With Quote #6

    Quote:
    Originally Posted by crazydog View Post
    I believe that's because for sourcemod to recognize the mapcycle changed (i.e. for listmaps to show the maps), you need to have the nextmap plugin reload.
    Ah, just another command to add to the 'cron' then, "sm plugins reload nextmap"
    psychonic is offline
    santaclaus
    Senior Member
    Join Date: Dec 2008
    Old 07-05-2010 , 05:14   Re: Timecycle
    Reply With Quote #7

    Actually what i'm looking for is to change mapcycle according to the number of players on.

    On some mod it would be really useful.
    __________________

    santaclaus is offline
    Reply



    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 12:21.


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