#define WARMUP_TIME 15.0 //Время разминки
#define HEALER_MAX_HEALTH 150.0 //Максимально возможное кол-во HP у игрока.
#define BUTTON_MIN_DELAY 5.0 // Задержка перед следующим нажатием на кнопку
#define BUTTON_MAX_USE 1 // Сколько раз террорист может нажать кнопку в указанный выше промежуток времени
#define UPDATE_INTERVAL 1.0 // Раз во сколько секунд обновлять информер.
#define DONT_SHOW_FOR_ALIVE //Не показывать информер живым
#define ADD_LIFES 1 // Сколько жизней прибавлять за убийство CT/TT
#define ALIVE_CT_TO_RESPAWN 3 // Кол-во живых CT для возможности респауна только-что убитого CT
#define SHOW_MENU_FOR_LAST_CT //Предложить Deul последнему CT
#define PRESTART_TIME 10 //Время на подготовку с дуэли
#define FIRE_TIME 5 // Время на выстрел в дуэли для дуэлянтов
#define DUEL_TIME 60 // Максимальное время дуэли
#define MAX_DISTANCE 1500 // Максимальная дистанция между дуэлянтами
#define MIN_DISTANCE 300 // Минимальная дистанция между дуэлянтами
#define MAX_HEALTH 100 // Максимальное HP для свободного режима
#define TERRORIST_HEALTH 150 //Здоровье Террориста
#define MAX_OVERHEAT 200 //Порог для перегрева пулемёта
#define STOP_BALL_AFTER_TOUCH //Останавливать снежок после попадания?
#define SNOWBALL_AMOUNT 200 // Кол-во снежков
#define SNOWBALL_DAMAGE 25.0 // Урон от попадания снежком
#define SNOWBALL_VELOCITY 2000.0 // Скорость снежка
#define SNOWBALL_LIFETIME 5.0 // Как долго снежок может лететь
#define DEFAULT_BHOP 1 // Включать в модах Auto Bhop по умолчанию
#define DEFAULT_USP 1 // Выдавать CT по умолчанию USP в моде
#define TIMER 15 // Максимальное время показа меню режимов
/**
* Forward which called when chosen new terrorist(new round or disconnect).
*
* @param id Player index.
*/
forward dr_chosen_new_terrorist(id);
/**
* Get player index current terrorist.
*
* @return Player index.
*/
native dr_get_terrorist();
/**
* Set player who became terrorist in new round.
*
* @param id Next terrorist index.
*/
native dr_set_next_terrorist(id);
/**
* Get player who became terrorist in new round.
*
* @return Player index.
*/
native dr_get_next_terrorist();
enum _:ModeData
{
m_Name[32],
m_Mark[16],
m_RoundDelay,
m_CurDelay,
m_CT_BlockWeapon,
m_TT_BlockWeapon,
m_CT_BlockButtons,
m_TT_BlockButtons,
m_Bhop,
m_Usp,
m_Hide
};
/**
* Mode registration.
*
- @param Name Mode name, use ML key.
- @param Mark Mode mark, use this to get mode index in other plugins.
- @param RoundDelay Mode blocking in rounds.
- @param CT_BlockWeapons Allow CT pick up weapons.
- @param TT_BlockWeapons Allow TT pick up weapons.
- @param CT_BlockButtons Allow CT use buttons.
- @param TT_BlockButtons Allow TT use buttons.
- @param Bhop Enable autobhop.
- @param Usp Enable start with USP for CT.
- @param Hide Allow hide mode in menu.
*
* @return Mode index.
*/
native dr_register_mode(Name[32], Mark[16], RoundDelay, CT_BlockWeapons, TT_BlockWeapons, CT_BlockButtons, TT_BlockButtons, Bhop, Usp, Hide = 0);
/**
* Get current mode.
*
- @param name Mode name, here will be copied the current mode ML key.
- @param size Name size.
*
* @return Mode index.
*/
native dr_get_mode(name[] = "", size = 0);
/**
* Set new mode.
*
- @param mode Mode index.
- @param fwd Call forward(dr_selected_mode).
- @param id Player index in forward.
*/
native dr_set_mode(mode, fwd = 0, id = 0);
/**
* Get mode by mark.
*
* @param mark Mode mark.
*
* @return Mode index.
*/
native dr_get_mode_by_mark(mark[]);
/**
* Get full mode info.
*
- @param mode Mode index.
- @param modeinfo Info array.
*/
native dr_get_mode_info(mode, modeinfo[ModeData]);
/**
* Set mode autobhop.
*
* @param bhop 0 - OFF, 1 - ON.
*/
native dr_set_mode_bhop(bhop);
/**
* Get mode autobhop.
*
* @return 0 - OFF, 1 - ON.
*/
native dr_get_mode_bhop();
/**
* Set player autobhop.
*
* @note The value for a mode bhop more important than for the player.
*
- @param id Player index.
- @param bhop false - OFF, true - ON.
*/
native dr_set_user_bhop(id, bool:bhop);
/**
* Get player autobhop.
*
* @param id Player index.
*/
native bool:dr_get_user_bhop(id);
/**
* Forward which called when the selection mode.
*
- @param id Terrorist index.
- @param mode Mode index.
*/
forward dr_selected_mode(id, mode);
const ITEM_TEAM_T = (1 << 1);
const ITEM_TEAM_CT = (1 << 2);
/**
* Item registration in shop
*
- @param name Item name in menu
- @param cost Item cost
- @param team Team access, bitsum, use ITEM_TEAM_T, ITEM_TEAM_CT
- @param access Admin access, admin flags
- @param on_buy OnBuy function(id)
- @param can_buy CanBuy function(id), should return ITEM_ENABLED or ITEM_DISABLED
*
* @return Item index, use with changing cost
*/
native dr_shop_add_item(name[], cost, team = (ITEM_TEAM_T|ITEM_TEAM_CT), access = 0, on_buy[], can_buy[] = "");
/**
* Use this in CanBuy function
*
* @param addition Additional string in menu
*/
native dr_shop_item_addition(addition[]);
/**
- @param item Item index
- @param cost New item cost
*/
native dr_shop_set_item_cost(item, cost);
enum CancelType
{
CType_TimeOver,
CType_PlayerDisconneced,
CType_PlayerDied,
CType_ModeChanged
}
/**
* Forward which called before duel start, warm up time
*
- @param duelist_ct Player index.
- @param duelist_t Player index.
*/
forward dr_duel_prestart(duelist_ct, duelist_t);
/**
* Forward which called when duel started
*
- @param duelist_ct Player index.
- @param duelist_t Player index.
*/
forward dr_duel_start(duelist_ct, duelist_t);
/**
* Forward which called when duel overed
*
- @param winner Player index.
- @param looser Player index.
*/
forward dr_duel_finish(winner, looser);
/**
* Forward which called when duel canceled
*
* @param type Cancel type
*/
forward dr_duel_canceled(CancelType:type);