Страница 1 из 1

Auto restart.

Добавлено: 22 дек 2016, 15:25
Tur!nA^^
Очень не хватает авто рестарта на сервере 3. особенно на картах где есть авп. Только появился и сразу ибили. очень хоалось что бы был какой нибудь плагин вроде этого.

Код: Выбрать все

/*********************************************************************************

  Auto Game Restart with Countdown Timer
  Version 1.0
  Created by AbeX
  19.02.2008

  Features:
  
    Plugin restarts the game after the time in seconds you have choose.
    Also it shows HUD message with countdown timer in the center of screen.
    After restart the message "LIVE ! LIVE ! LIVE !" will appear in chat.
    Counting starts at game commencing.

  Installation:
  
    Put compiled plugin in the /plugins/ directory.
    Add line containing "auto_rr.amxx" into your plugins.ini file.
    
  Requirements:
  
    None (amxmodx)

  Configuration:
  
    Use autorr_time (float) CVAR in your amxx.cfg change the time after
    that game will be restarted. Example:
    
    autorr_time 10.0 //game will be restarted in 10 seconds, default: 20.0
  
**********************************************************************************/


#include <amxmodx>

new g_Seconds
new g_SecondsCvar

public plugin_init
() {
    register_plugin("Auto Game Restart with Countdown Timer", "1.0", "AbeX")
    register_event("TextMsg", "game_commencing", "a", "2=#Game_Commencing")
    g_SecondsCvar = register_cvar("autorr_time","35.0")
}

public game_commencing() {
    if (task_exists(41170))
        remove_task(41170)
    g_Seconds = floatround(get_pcvar_float(g_SecondsCvar))
    new param[32]
    set_task(1.0,"count_rr",41170,param,31,"b",0)    
}

public count_rr() {    
    g_Seconds
--;
    set_hudmessage(255, 255, 255, -1.0, 0.4, 0, 6.0, 1.0)
    show_hudmessage(0, "Автоматичний рестарт через %d секунд",g_Seconds)    
    if 
(g_Seconds == 0) {
        server_cmd("sv_restartround 3")    
        client_print
(0, print_chat, "Рознисемо тут усе!!!")
        remove_task(41170)
    }
}
 

Re: Auto restart.

Добавлено: 28 дек 2016, 19:39
Dame-DaNNers
Очень не хватает авто рестарта на сервере 3. особенно на картах где есть авп. Только появился и сразу ибили. очень хоалось что бы был какой нибудь плагин вроде этого.

В ближайшие дни будет добавлен.