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

Random Cycle


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Plugin ID:
193
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Chooses a random map from the map cycle or specified file, and sets it to sm_nextmap
    Unapprover:
    Reason for Unapproving:
    Added to SM Base
    Old 09-25-2007 , 11:41   Random Cycle
    Reply With Quote #1

    RandomCycle

    Does nothing more than set sm_nextmap to a random choice when the map starts.

    Two Cvars:
    sm_randomcycle_file - File to get map list from, default addons/sourcemod/configs/maps.ini. If not found, will use mapcyclefile

    sm_randomcycle_exclude - Default 5. The past x maps will be excluded from the random cycle. Ignored if cycle is less than this.

    Made to satisfy:
    http://forums.alliedmods.net/showthread.php?t=60907
    __________________
    I'm a blast from the past!

    Last edited by ferret; 09-25-2007 at 22:52.
    ferret is offline
    pZv!
    Junior Member
    Join Date: Sep 2007
    Old 09-25-2007 , 12:29   Re: Random Cycle
    Reply With Quote #2

    Hm.That make tough to get more than five maps excluded.

    Code:
    if (GetArraySize(g_OldMapList) > 5)
    shouldn't be:

    Code:
    if (GetArraySize(g_OldMapList) > GetConVarInt(g_Cvar_ExcludeMaps))
    ?
    That same is for mapchooser.

    Last edited by pZv!; 09-25-2007 at 12:35.
    pZv! is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-25-2007 , 12:43   Re: Random Cycle
    Reply With Quote #3

    Whoooooooooooooooooooops. Thanks for the catch. That was written before I added an exclude cvar.
    __________________
    I'm a blast from the past!
    ferret is offline
    pZv!
    Junior Member
    Join Date: Sep 2007
    Old 09-25-2007 , 12:59   Re: Random Cycle
    Reply With Quote #4

    No problem.
    Such bugs are inevitable and only what we can do is to catch them all, together
    pZv! is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-25-2007 , 13:25   Re: Random Cycle
    Reply With Quote #5

    Bugs are Pokemon?!?! I CHOOSE YOU STRCMP!
    __________________
    I'm a blast from the past!
    ferret is offline
    imported_Anth0ny
    Senior Member
    Join Date: Jan 2005
    Location: Saturn
    Old 09-25-2007 , 15:53   Re: Random Cycle
    Reply With Quote #6

    I choose you, Boulbasavr =)))

    Nice plugin, will test it.
    __________________
    aka Mad.Eagle
    Creator\Owner\Admin of
    www.megatron.ws
    imported_Anth0ny is offline
    Send a message via ICQ to imported_Anth0ny
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-25-2007 , 15:58   Re: Random Cycle
    Reply With Quote #7

    This needs one small change, but I'll make it later. It needs to delay setting nextmap for a moment or two, to make sure Nextmap's own OnMapStart stuff doesn't get in the way.
    __________________
    I'm a blast from the past!
    ferret is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-25-2007 , 22:51   Re: Random Cycle
    Reply With Quote #8

    I've added this to SM base, so unapproving and removing download link. Look in the disabled plugins folder of latest builds.
    __________________
    I'm a blast from the past!
    ferret is offline
    Nomarky
    SourceMod Donor
    Join Date: Sep 2007
    Old 09-30-2007 , 08:11   Re: Random Cycle
    Reply With Quote #9

    Hi, sorry if this is the wrong place to ask this, but I'm having some issues with this plugin. I have set it up to look for maps.ini in sourcemod/configs, but it is still changing to maps that arn't in maps.ini. Is there any other way to force it to use this file?

    Also, I set it to exclude the last 30 maps in maps.ini, but I am pretty sure, though not certain, that it is changing to maps that should be excluded. Any ideas?

    I am using the plugin included in the latest sourcemod build

    Cheers!
    Nomarky is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-30-2007 , 11:09   Re: Random Cycle
    Reply With Quote #10

    How many maps are in maps.ini? If its less than 30, it will stop excluding maps. Check your log file. The plugin will put out a message saying which file it loaded.
    __________________
    I'm a blast from the past!
    ferret 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 22:35.


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