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

AUTO MAP change when less players.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nbanow
Senior Member
Join Date: Dec 2010
Location: Lithuania
Old 01-18-2014 , 03:43   AUTO MAP change when less players.
Reply With Quote #1

Hello, mates.
I'm looking for plugin which could change maps by detecting how many players are currently playing.
I can imagine that here should be 2 .txt files : with SMALL.txt / BIG.txt maps.
When server is clean or even 1-7 players are in, server keeps a small map. If 8th player connected server should use BIG.txt file and make a vote of higher maps with announcing, that THIS MAP IS TOO SMALL FOR 8 Players. Vote has just started.
The same with big maps. If there are just 7 players left in a bigger map, server should offer a votemap for smaller one too.
Thanks.
[IMG]https://imagizer.**************/v2/792x215q50/585/fu8n.png[/IMG]

Last edited by Nbanow; 01-18-2014 at 03:52.
Nbanow is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 01-18-2014 , 06:27   Re: AUTO MAP change when less players.
Reply With Quote #2

sorry for a non-positive answer, but I saw similar threads in the requests section, many times.
also idk if the map plugins like galileo, deagle's map manager, etc. are including what you are asking for, just search keywords like map* only in titles.
__________________
ANTICHRISTUS is offline
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-19-2014 , 09:58   Re: AUTO MAP change when less players.
Reply With Quote #3

You can try this:

PHP Code:
#include < amxmodx >

new const harti[][] =
{
    
"aim_map",
    
"cs_deagle5",
    
"cs_assault",
    
"fy_buzzkill",
    
"fy_dust",
    
"fy_rush",
    
"fy_snow",
    
"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( ) < 10 
    {
        new 
mapname[31];
        
get_mapname(mapname,31)
        
        if(
equali(mapname"aim_map") || equali(mapname"cs_deagle5") || equali(mapname"cs_assault")
        || 
equali(mapname"fy_buzzkill") || equali(mapname"fy_dust") || equali(mapname"fy_rush")
        || 
equali(mapname"fy_snow") || equali(mapname"fy_snow3") || equali(mapname"de_dust2x2"))
        {
            return 
PLUGIN_HANDLED;
        }
    
        else
        {
            
set_task1.0"message" );
        
            
set_task60.0"change" );    
        }
    }
        
    else
    {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;    
}

public 
message( )
{
    new 
mapname[31];
    
get_mapname(mapname,31)
    
    
chat_color(0"!g TEXT MESSAGE"mapname)
}

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

stock chat_color(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)

    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!n""^1")
    
replace_all(msg190"!t""^3")

    if (
idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
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 03:46.


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