Cvar | Default | Description |
---|---|---|
hns_rules | 0 | Режим по умолчанию (0 - MR 1 - Timer) |
hns_wintime | 15 | Время для победы |
hns_rounds | 6 | Кол-во раундов для победы |
hns_duel | 3 | Кол-во выигранных раундов для победы |
hns_boost | 0 | Включить/Отключить буст режим |
hns_onehpmode | 0 | Включить/Отключить 1 хп режим |
hns_flash | 1 | Кол-во флешек (Плагин сам изменяет) |
hns_smoke | 1 | Кол-во дыма (Плагин сам изменяет) |
hns_last | 1 | Включить/Отключить выдачу гранат последнему ТТ |
hns_dmrespawn | 3 | Время (в секундах), в течение которого игрок возродится в режиме DM |
hns_survotetime | 10 | Время (в секундах), в течение которого идет голосование (surrender) |
hns_randompick | 1 | Включить/Отключить случайный выбор игроков |
hns_knifemap | 35hp_2 | Ножевая карта |
hns_prefix | MATCH | Префикс системы |
#define rg_get_user_team(%0) get_member(%0, m_iTeam)
enum _:HNS_MODES
{
MODE_TRAINING,
MODE_KNIFE,
MODE_PUB,
MODE_DM,
MODE_ZM,
MODE_MIX
}
enum MATCH_STATUS
{
MATCH_NONE,
MATCH_CAPTAINPICK,
MATCH_CAPTAINKNIFE,
MATCH_TEAMPICK,
MATCH_TEAMKNIFE,
MATCH_MAPPICK,
MATCH_WAITCONNECT,
MATCH_STARTED
}
enum MODE_STATES
{
STATE_DISABLED,
STATE_PREPARE,
STATE_PAUSED,
STATE_ENABLED
}
/*
* Gets the system prefix.
*
* @param szPrefix Buffer to copy prefix to
* @param iLen Maximum buffer size
*
* @noreturn
*/
native hns_get_prefix(szPrefix[], iLen);
/*
* Gets mode system.
*
* @return enum HNS_MODES
*/
native hns_get_mode();
/*
* Set mode system.
*
* @noreturn
*/
native hns_set_mode(iMode);
/*
* Gets match status.
*
* @return type MATCH_STATUS
*/
native MATCH_STATUS:hns_get_status();
/*
* Gets match state
*
* @return type MODE_STATES
*/
native MODE_STATES:hns_get_state();
/*
* Called when the match play begins.
*
* @noreturn
*/
forward hns_match_started();
/*
* Called when a match round is reset.
*
* @noreturn
*/
forward hns_match_reset_round();
/*
* Called, the match is canceled.
*
* @noreturn
*/
forward hns_match_canceled();
/*
* Called when the match is over.
*
* @param iWinTeam The winning team
* 1 - TT
* 1 - CT
* @noreturn
*/
forward hns_match_finished(iWinTeam);
forward hns_round_start();
forward hns_round_freezeend();
forward hns_round_end();
stock RegisterSayCmd(const szCmd[], const szShort[], const szFunc[], flags = -1, szInfo[] = "") {
new szTemp[65], szInfoLang[65];
format(szInfoLang, 64, "%L", LANG_SERVER, szInfo);
format(szTemp, 64, "say /%s", szCmd);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "say .%s", szCmd);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "/%s", szCmd);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "%s", szCmd);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "say /%s", szShort);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "say .%s", szShort);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "/%s", szShort);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
format(szTemp, 64, "%s", szShort);
register_clcmd(szTemp, szFunc, flags, szInfoLang);
return 1;
}
enum _:PTS_DATA {
bool:e_bInit, // Птс статистика получена
e_iPts, // Птс
e_iWins, // Победы
e_iLoss, // Поражения
e_iTop, // Топ
e_szRank[10] // Ранг
};
new g_ePlayerPtsData[MAX_PLAYERS + 1][PTS_DATA];
forward hns_pts_init_player(id, iPts, iWins, iLoss, iTop);
public hns_pts_init_player(id, iPts, iWins, iLoss, iTop) {
g_ePlayerPtsData[id][e_bInit] = true;
g_ePlayerPtsData[id][e_iPts] = iPts;
g_ePlayerPtsData[id][e_iWins] = iWins;
g_ePlayerPtsData[id][e_iLoss] = iLoss;
g_ePlayerPtsData[id][e_iTop] = iTop;
g_ePlayerPtsData[id][e_szRank] = get_skill_player(g_ePlayerPtsData[id][e_iPts]);
}
enum _:SKILL_INFO
{
SKILL_PTS,
SKILL_LVL[10]
};
new const g_eSkillData[][SKILL_INFO] = {
// pts skill
{ 0, "L-" },
{ 650, "L" },
{ 750, "L+" },
{ 850, "M-" },
{ 950, "M" },
{ 1050, "M+" },
{ 1150, "H-" },
{ 1250, "H" },
{ 1350, "H+" },
{ 1450, "P-" },
{ 1550, "P" },
{ 1650, "P+" },
{ 1750, "G-" },
{ 1850, "G" },
{ 1950, "G+" },
};
stock get_skill_player(iPts) {
new iPtr[10];
for (new i; i < sizeof(g_eSkillData); i++) {
if (iPts >= g_eSkillData[SKILL_PTS]) {
formatex(iPtr, charsmax(iPtr), "%s", g_eSkillData[SKILL_LVL]);
}
}
return iPtr;
}
/*
* Gets players table name.
*
* @param szTabiLename Buffer to copy prefix to
* @param iLen Maximum buffer size
*
* @noreturn
*/
native hns_sql_get_table_name(szTableName[], iLen);
/*
* Gets players id (`id`).
*
* @param id Client index
*
* @return player id
*/
native hns_sql_get_player_id(id);
/*
* Called when it connects to the data base
*
* @param Handle:hSqlTuple Handle to be connected
*
* @noreturn
*/
forward hns_sql_connection(Handle:hSqlTuple);
/*
* Called when we get player data
*
* @param id Client index
*
* @noreturn
*/
forward hns_sql_player_authorized(id);
enum _:TYPE_STATS
{
STATS_ROUND = 0,
STATS_ALL = 1
}
/*
* Gets players kills.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return kills num
*/
native hns_get_stats_kills(type, id);
/*
* Gets players deaths.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return deaths num
*/
native hns_get_stats_deaths(type, id);
/*
* Gets players assists.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return assists num
*/
native hns_get_stats_assists(type, id);
/*
* Gets players stabs.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return stabs num
*/
native hns_get_stats_stabs(type, id);
/*
* Gets players damage CT.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return damage CT num
*/
native hns_get_stats_dmg_ct(type, id);
/*
* Gets players damage TT.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return damage TT num
*/
native hns_get_stats_dmg_tt(type, id);
/*
* Gets players runned distance.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return runned distance float
*/
native Float:hns_get_stats_runned(type, id);
/*
* Gets players flash time.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return flash time float
*/
native Float:hns_get_stats_flashtime(type, id);
/*
* Gets players survive time.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return survive time float
*/
native Float:hns_get_stats_surv(type, id);
/*
* Gets players ownages.
*
* @param type Stats type: TYPE_STATS
* @param id Client index
*
* @return ownages num
*/
native hns_get_stats_ownages(type, id);