AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Maps on specific hours (https://forums.alliedmods.net/showthread.php?t=232207)

goodkat 12-27-2013 07:46

Maps on specific hours
 
I want to know if there is a plugin able to change maps, depending on the time.
Ex: from 10:00 to 20:00 to run some maps, and between 21:00 and 00:00 to run other maps.
Can someone pls help me with this one?

fysiks 12-27-2013 14:18

Re: Maps on specific hours
 
It depends on what map management plugin you are using though I'm not sure if they have it set up so that you will be able to do it.

goodkat 12-27-2013 17:47

Re: Maps on specific hours
 
i`m using galileo for now

fysiks 12-27-2013 18:46

Re: Maps on specific hours
 
I don't see an easy way to do it with Galileo without modifying it.

goodkat 12-28-2013 12:04

Re: Maps on specific hours
 
That`s why i asked for help. If someone can modify it.

daNzEt 12-28-2013 12:12

Re: Maps on specific hours
 
Try this:

PHP Code:

#include < amxmodx >

new const maxplayers 10

new const harti[][] =
{
    
"aim_map",
    
"cs_deagle5",
    
"cs_assault",
    
"cs_1337_assault",
    
"fy_buzzkill",
    
"fy_dinoiceworld",
    
"fy_dustbomb",
    
"fy_dust",
    
"fy_iceworld",
    
"fy_rush",
    
"fy_snow",
    
"fy_snow2010",
    
"fy_snow2011",
    
"fy_snow3",
    
"de_dust2x2"
}

public 
plugin_init( )
{
    
register_plugin"Map Scheduler" "1.0""daNzEt" );

    
register_logevent"EventRoundStart"2"1=Round_Start" );
}

public 
EventRoundStart( )
{
    
set_task60.0"checkplayers" );
}

public 
checkplayers( )
{    
    if ( 
get_playersnum( ) <= maxplayers 
    {
        new 
mapname[31]
        
get_mapname(mapname,31)
        
        if(
equali(mapname"aim_map") || equali(mapname"cs_deagle5") || equali(mapname"cs_assault") || equali(mapname"cs_1337_assault")
        || 
equali(mapname"fy_buzzkill") || equali(mapname"fy_dinoiceworld") || equali(mapname"fy_dustbomb") || equali(mapname"fy_dust")
        || 
equali(mapname"fy_iceworld") || equali(mapname"fy_rush") || equali(mapname"fy_snow") || equali(mapname"fy_snow2010")
        || 
equali(mapname"fy_snow2011") || equali(mapname"fy_snow3") || equali(mapname"de_dust2x2"))
        {
            return 
PLUGIN_HANDLED;
        }
    
        else
        {
            
client_print(0print_chat"Because of the small number of players we will change this map")
            
            
set_task30.0"changemap" );
        }
    }
        
    else if ( 
get_playersnum( ) > maxplayers 
    {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;    
}

public 
changemap( )
{            
    
server_cmd"changelevel %s"harti[random_num(0charsmax(harti))] )


And modify which maps you want server to change and number of maxplayers.

wickedd 12-28-2013 12:14

Re: Maps on specific hours
 
That's not what he asked for.

goodkat 12-29-2013 17:41

Re: Maps on specific hours
 
it`s working. it`s not what i`ve asked for but it`s perfect. thanks

r3D w0LF 12-30-2013 05:56

Re: Maps on specific hours
 
try amx_task "time" "map" tr
i think its called task scheluder
ex: amx_task 13:00 "amx_map de_dust2" rt

https://forums.alliedmods.net/showthread.php?t=1263 heres plugin


All times are GMT -4. The time now is 20:27.

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