Raised This Month: $120 Target: $400
 30% 

auto map chnage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
paulitooo
Junior Member
Join Date: Dec 2018
Old 12-06-2018 , 09:17   auto map chnage
Reply With Quote #1

hi all , I need plugin when the serverver are 10 players map auto change fy_snow
paulitooo is offline
Alber9091
Senior Member
Join Date: Jun 2014
Location: Some Where On Earth
Old 12-06-2018 , 09:45   Re: auto map chnage
Reply With Quote #2

https://neugomon.ru/threads/116/

Here is more what, similar to it, but problem is when players are zero.

Download and Paste Script Here, may be someone can edit it for you !!!
__________________
Alber9091 is offline
paulitooo
Junior Member
Join Date: Dec 2018
Old 12-06-2018 , 11:23   Re: auto map chnage
Reply With Quote #3

enybody help me?
paulitooo is offline
Nutu_
Senior Member
Join Date: Mar 2016
Location: no where
Old 12-06-2018 , 14:39   Re: auto map chnage
Reply With Quote #4

Albert helped you... download that plugin and change the amount from 0 to 10
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
Alber9091
Senior Member
Join Date: Jun 2014
Location: Some Where On Earth
Old 12-07-2018 , 07:35   Re: auto map chnage
Reply With Quote #5

Quote:
Originally Posted by paulitooo View Post
enybody help me?
Set Them According To Your Need.

PHP Code:
#define MIN_PLAYERS    10
#define MAP        "de_dust2_2x2
#define VOTETIME    20 
PHP Code:
/*
    neygomon created ^_^ | http://www.neugomon.ru
    
    No Players Map - для пустых серверов =) Меняет карту на заданную
    Особенности:
        * Вызывает голосование если на сервере игроков меньше чем указано
        * Если сервер пустой, то карта меняется на указанную
        * Если карта в плагине и текущая карта на сервере совпадают - плагин отключается
        * Карту меняет в начале раунда, аля Last Round
        * Сообщения в чат о результатах голосования

    Credits: 
        * death_error. За идею
    
    Information: 
        * Скальпель, соси болт причмокивая :)
*/


#include <amxmodx>

#if AMXX_VERSION_NUM < 183
    #define engine_changelevel(%0) server_cmd("changelevel %s", %0)
#endif

#define MIN_PLAYERS    10        // Минимум игроков, после которых начинают считаться проверки
#define NUM_CHECKS    3        // Число проверок пустого сервера или с малым кол-вом игроков. Далее запуск голосования.
#define VOTETIME    20        // Время голосования
#define MAP        "de_dust2_2x2"    // Карта, на которую менять
// #define NO_ROUND            // Поддержка бесконечного раунда

new iSelectKey[2];
#if !defined NO_ROUND
new bool:g_bChangeMap;
new 
bool:g_bFirstRound true;
#endif
public plugin_init()
{
#define PLUGIN     "No Players Map"
#define VERSION "1.03"
    
register_plugin(PLUGINVERSION"neygomon");

    new 
map[32]; get_mapname(mapcharsmax(map));
    if(!
strcmp(mapMAP))
    {
        
log_amx("Plugin %s[%s] stopped! Curr map %s contains in plugin %s"PLUGINVERSIONmapMAP);
        
pause("ad");
        return;
    }
#if defined NO_ROUND
    
set_task(60.0"eRoundStart", .flags="b");
#else    
    
register_event("HLTV""eRoundStart""a""1=0""2=0");
    
register_logevent("LeRestartRound"2"1&Restart_Round_");
#endif
    
register_menucmd(register_menuid(PLUGIN), MENU_KEY_1|MENU_KEY_2"NPMHandler");    
}
#if !defined NO_ROUND
public LeRestartRound()
    
g_bFirstRound true;
#endif
public eRoundStart()
{
    static 
players[32], iCheckiCheck2pl
#if !defined NO_ROUND
    
if(g_bChangeMap)
    {
        
engine_changelevel(MAP);
        return 
PLUGIN_CONTINUE;
    }
    if(
g_bFirstRound)
    {
        
iCheck iCheck2 0;
        
g_bFirstRound false;
    }
#endif    
    
get_players(playerspl"ch");
    if(!
pl)
    {
        if(++
iCheck >= NUM_CHECKS)
            
engine_changelevel(MAP);
    }
    else if(
pl MIN_PLAYERS)
    {
        if(++
iCheck2 >= NUM_CHECKS)
        {
            new 
szMenu[256], iLeniKeys MENU_KEY_1|MENU_KEY_2;
            
iLen formatex(szMenucharsmax(szMenu), "\d[\r%s\d] \yНа сервере мало игроков \d[\r%d чел\d]^n\wСменить карту на \r%s\w?^n^n"PLUGINplMAP);
            
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen"\r1. \wДа^n");
            
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen"\r2. \wНет^n");
            
            
set_task(float(VOTETIME), "CheckResult");
            return 
show_menu(0iKeysszMenuVOTETIMEPLUGIN);
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
NPMHandler(idiKey)
{
    switch(
iKey)
    {
        case 
0iSelectKey[0]++;
        case 
1iSelectKey[1]++;
    }
    return 
PLUGIN_HANDLED;
}

public 
CheckResult()
{
    if((
iSelectKey[0] > iSelectKey[1]) || (!iSelectKey[0] && !iSelectKey[1]))
    {
        
ChatColor("^1[^4%s^1] ^4Голосование состоялось! Следующая карта ^3%s"PLUGINMAP);
#if defined NO_ROUND
        
engine_changelevel(MAP);
#else        
        
g_bChangeMap true;
#endif        
        
return;
    }
    
ChatColor("^1[^4%s^1] ^4Голосование ^3не ^4состоялось! В след. раунде спрошу еще раз :D"PLUGIN);
    
arrayset(iSelectKey0sizeof iSelectKey);
}

stock ChatColor(const szMessage[], any:...)
{
    static 
pnumplayers[32], szMsg[190], IdMsg
    
vformat(szMsgcharsmax(szMsg), szMessage2);
    
    if(!
IdMsgIdMsg get_user_msgid("SayText");
    
    
get_players(playerspnum"ch");
    
    for(new 
ipnumi++)
    {
        
message_begin(MSG_ONEIdMsg, .player players[i]);
        
write_byte(players[i]);
        
write_string(szMsg);
        
message_end();
    }

__________________
Alber9091 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 14:22.


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