Иконка ресурса

Map Manager: zBot 1.0

Нет прав для скачивания
Код:
#include <amxmodx>
#include <map_manager>

#define MAX_MAPNAME_LENGTH 32

new g_pCvarBotStop, g_pCvarTimeBeforeRemoveBotStop, g_pCvarChangeType

public plugin_init() {
    register_plugin("Map Manager: zBot", "1.0", "CHEL74")
 
    g_pCvarBotStop = get_cvar_pointer("bot_stop")
    g_pCvarTimeBeforeRemoveBotStop = register_cvar("mapm_time_before_remove_bot_stop", "0.35")
    g_pCvarChangeType - get_cvar_pointer("mapm_change_type")
}

public mapm_prepare_votelist() {
    set_pcvar_num(g_pCvarBotStop, 1)
}

public mapm_vote_canceled() {
    set_task(get_pcvar_float(g_pCvarTimeBeforeRemoveBotStop), "RemoveBotStop")
}

public mapm_vote_finished(const szNewMap[]) {
    if(!get_pcvar_num(g_pCvarChangeType)) {
        new szCurrentMap[MAX_MAPNAME_LENGTH]
        get_mapname(szCurrentMap, charsmax(szCurrentMap))
     
        if(!equal(szNewMap, szCurrentMap)) {
            return
        }
    }
 
    set_task(get_pcvar_float(g_pCvarTimeBeforeRemoveBotStop), "RemoveBotStop")
}

public RemoveBotStop() {
    set_pcvar_num(g_pCvarBotStop, 0)
}
Назад
Верх