This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- - - - - - Description: - - - - - - Plugin puts in the time that you want dm mode. When the plugin is active is he doing next(when it comes your time, without changing the map):
- Remove object on map, - Block round end, - More spawn points, - Menu with weapon: + New Weapons + Last Weapons + 2 + Dont ask again - Remove buy zone, - Remove money(hud), - Remove(hud) and block timer, - Spawn protection, - HP for kill, hs, screen fade and give armor and granades on spawn, - Remove weapon on ground, - Every full BPAmmo, - ... When the finish time for dm everything back to normal, without changing the map. - - - - - - Cvars: - - - - - - Auto-write cfg with all cvars in amxmodx/configs/NightDM.cfg Only this change, if you writing nodes to another CFG will have no effect. + dx_start 23 // Hour at which the DM start, example 2 = 2 am and 14 = 2 pm. + dx_end 9 // Hour at which the DM end, example 2 = 2 am and 14 = 2 pm. - TIME: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,00 + dx_sptime 5 // The Player get godmode for X seconds and cant get damage. + dx_time 5 // Time for removing weapon on the ground. + dx_hp 15// HP for kill. + dx_hp_hs 40// HP for kill HS. + dx_max_hp 100// Maximum player's HP. + dx_armor 100 // Amout of armor to be given. + dx_prefix CSDM // Prefix + dx_msg_color "0 130 0" // Message color + dx_msg_xypos "0.02 0.2" // Message X Y + dx_msg 1 // Message. 1- On 0-off + dx_grenades "abc" // a - he grenade, b - smoke grenade, c - flashbang + dx_change "ab" // a - change sky on space, b - change lights on d
- - - - - - Changelog: - - - - - - v1.0 [4.jul.2015] - First release. v1.1 [17.aug.2015] - Customizable Weapons list for Primary and Secondary weapons (ini file). - Added Multilingual support. - Added cvar for granades. - Added cvar for change space and lights. - Added cvar for message enable/disable, color and xy position. - Added print in color.
new const g_objective_ents[][] = { "func_bomb_target", "info_bomb_target", "hostage_entity", "monster_scientist", "func_hostage_rescue", "info_hostage_rescue", "info_vip_start", "func_vip_safetyzone", "func_escapezone" }; new g_hWeaponMenu; new g_hPrimaryWeaponMenu; new g_hSecondaryWeaponMenu; new bool:g_bRememberGuns[ 33 ]; new g_iPrimaryWeapon[ 33 ]; new g_iSecondaryWeapon[ 33 ];
new bool:g_nightdm; new cvar_start; new cvar_end; new cvar_time; new message[80]; new g_ClassName[] = "hud_info"; new g_MsgSync1; new g_MsgSync2; new g_MsgSync3; new bool:g_restart; new bool:g_restart2; new gMaxClients; new pCvarTime; new normalsky[64]; new configsDir[64]; new dFile[256]; new health_add; new health_hs_add; new health_max; new gmsgScreenFade; new gCvarArmor;
new g_WeaponSlots[] ={ 0, 2, 0, 1, 4, 1, 5, 1, 1, 4, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 4, 2, 1, 1, 3, 1 }; new Float:g_SpawnVecs[MAX_SPAWNS][3]; new Float:g_SpawnAngles[MAX_SPAWNS][3]; new Float:g_SpawnVAngles[MAX_SPAWNS][3]; new g_TotalSpawns; new CvarPrefix; new Prefix[ 32 ]; new g_msg_color; new g_msg_xypos; new g_msg_enable; new g_grenades; new g_change; new g_szWepFile[256]; new g_FilePointer; new Array:g_PrimaryWeapons; new Array:g_SecondaryWeapons;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR);
log_amx("Loaded %d spawn points for map %s.", g_TotalSpawns, Map); } else { log_amx("No spawn points file found (%s)", MapFile); }
return 1; } public spawn_Preset(id) { if (g_TotalSpawns < 2) return PLUGIN_CONTINUE;
new list[MAX_SPAWNS]; new num = 0; new final = -1; new total=0; new players[32], n, x = 0; new Float:loc[32][3], locnum;
//cache locations get_players(players, num); for (new i=0; i<num; i++) { if (is_user_alive(players[i]) && players[i] != id) { entity_get_vector(players[i], EV_VEC_origin, loc[locnum]); locnum++; } }
num = 0; while (num <= g_TotalSpawns) { //have we visited all the spawns yet? if (num == g_TotalSpawns) break; //get a random spawn n = random_num(0, g_TotalSpawns-1); //have we visited this spawn yet? if (!list[n]) { //yes, set the flag to true, and inc the number of spawns we've visited list[n] = 1; num++; } else { //this was a useless loop, so add to the infinite loop prevention counter total++; if (total > 100) // don't search forever break; continue; //don't check again }
new trace = trace_hull(g_SpawnVecs[n],1); if (trace) continue;
if (locnum < 1) { final = n; break; }
final = n; for (x = 0; x < locnum; x++) { new Float:distance = get_distance_f(g_SpawnVecs[n], loc[x]); if (distance < 250.0) { //invalidate final = -1; break; } }
public CreateWeaponsArray() { get_configsdir(g_szWepFile, charsmax(g_szWepFile)); //gets addons/amxmodx/configs directory format(g_szWepFile, charsmax(g_szWepFile), "%s/NightDM_Weapon.ini", g_szWepFile); //formats the file name for the Weapons order INI g_FilePointer = fopen(g_szWepFile, "r");
new g_BlockedCmds[][] = { // Команды, которые блокировать на время режима "say rtv", "say /rtv", "amx_map", "amx_votemap", "amx_rtv" }
new g_ExecStartCmds[][] = { // Команды, которые выполнять перед ночным режимом "amxx pause galileo.amxx", "mp_timelimit 0" // не убирать, иначе ппц :) }
new g_ExecEndCmds[][] = { // Команды, которые выполнить после ночного режима "amxx unpause galileo.amxx", "exec server.cfg" }
new bool:g_bNightMode;
enum _:DATA2 { sTIME, eTIME } new g_iUnixTime[][DATA2];
public plugin_init() { register_plugin("NightMode", "1.0 Beta", "neygomon");
for(new i; i < sizeof g_BlockedCmds; i++) register_clcmd(g_BlockedCmds[i], "ClCmdBlock");
public ClCmdBlock(id) { if(g_bNightMode) { client_print(id, print_chat, "* Команда заблокирована на время ночного режима!"); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; }
public plugin_end() { if(g_bNightMode) for(new i; i < sizeof g_ExecEndCmds; i++) server_cmd("%s", g_ExecEndCmds[i]); }
Как впилить в этот плагин режим FFA (каждый сам за себя) ?? Очень не хватает.
Отредактировал: best101, - 4.9.2016, 7:14
Поблагодарили 0 раз Поблагодарили 0 раз
Inf19
20.11.2016, 10:35
Сообщение
Стаж: 10 лет
Сообщений: 570
Благодарностей: 79
Полезность: 22
Цитата
Как впилить в этот плагин режим FFA (каждый сам за себя) ?? Очень не хватает.
тоже интересно
Отредактировал: Inf19, - 29.11.2016, 11:39
Установка и настройка Amxbans, CS:BANS, Web - статистик. Установка и настройка AMX плагинов, модулей, META модулей на сервер
Поблагодарили 0 раз Поблагодарили 0 раз
carter
30.11.2016, 23:49
Сообщение
Стаж: 13 лет
Сообщений: 111
Благодарностей: 4
Полезность: 35
У меня почему то не запускается меню оружия. В логе ошибок нет =\. прописываю /guns пишет меню уже активно. ReHLDS - 934 Regamedll
плагины
Cкрытый текст
; AMX Mod X plugins
aim_detector.amxx advanced_bans.amxx
; Admin Base - Always one has to be activated admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) plmenu.amxx ; players menu (kick, ban, client cmds.) ;telemenu.amxx ; teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) pluginmenu.amxx ; Menus for commands/cvars organized by plugin
; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands
; Map related map_chooser.amxx ;nextmap.amxx ; displays next map in mapcycle ;mapchooser.amxx ; allows to vote for next map ;timeleft.amxx ; displays time left on map
; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands
; Counter-Strike restmenu.amxx ; restrict weapons menu statsx_gui_skill.amxx ;statsx_shell.amxx debug ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!)
; Enable to use AMX Mod plugins ;amxmod_compat.amxx ; AMX Mod backwards compatibility layer
Всем доброй вечер, народ, помогите исправить в этом плагине, чтобы режим включался не в процессе игры, в заданное время, а чтобы была именно смена карты (рестарт карты - перезаход) Помогите пожалуйста. Спасибо.
Народ, ну так что, реально ни кто не может немного подредактировать данный плагин, чтобы именно рестарт карты был ? Вроде столько народу по скриптингу, а толку нет ни какого... Могу денег дать.
Поблагодарили 0 раз Поблагодарили 0 раз
Acer
2.3.2017, 23:20
Сообщение
Стаж: 9 лет 3 месяца Город: Chicago
Сообщений: 304
Благодарностей: 55
Полезность: 35
Пробовал кто нибудь, совместить с lite nightmode? Нормально работает?
Поблагодарили 0 раз Поблагодарили 0 раз
Lady
25.5.2019, 9:10
Сообщение
Стаж: 7 лет 9 месяцев
Сообщений: 430
Благодарностей: 39
Полезность: 96
как можно выключить некоторые плагины на время дм?
Поблагодарили 0 раз Поблагодарили 0 раз
cs7RG
25.5.2019, 10:14
Сообщение
Стаж: 10 лет Город: Иваново
Сообщений: 693
Благодарностей: 139
Полезность: 79
Lady,
night_end.cfg
//================================================================== // Конфигурационный файл плагина CFG Nightmode // Автор neygomon | // Конфиг, который грузится после ночного режима //==================================================================
//================================================================== echo "* Loaded CFG End Night!"
night_start.cfg
//================================================================== // Конфигурационный файл плагина CFG Nightmode // Автор neygomon | // Конфиг, который грузится в начале ночного режима //==================================================================
// Отключение плагинов в ночное время amxx pause adminvote.amxx amxx pause mapsmenu.amxx amxx pause mapchooser.amxx
// Включение плагинов в ночное время night_load plugin1.amxx night_load plugin2.amxx
cs7RG, подскажите здесь что прописывать? // Включение плагинов в ночное время night_load plugin1.amxx night_load plugin2.amxx
Поблагодарили 0 раз Поблагодарили 0 раз
cs7RG
25.5.2019, 11:25
Сообщение
Стаж: 10 лет Город: Иваново
Сообщений: 693
Благодарностей: 139
Полезность: 79
Lady, руками создаем 2 файла в папке configs night_end.cfg night_start.cfg
наполнение файлов под spoilerom
далее просто открываем глаза и читаем.
Помог ? Нажмиспасибку »
Поблагодарили 0 раз Поблагодарили 0 раз
Lady
25.5.2019, 11:28
Сообщение
Стаж: 7 лет 9 месяцев
Сообщений: 430
Благодарностей: 39
Полезность: 96
cs7RG, 2 файла создала, это всё туда скопировала, нужные плагины на паузу и с паузы прописала, но вот эта строчка не понятная:( night_load night_dm.amxx - вот так что ли надо?
cs7RG, 2 файла создала, это всё туда скопировала, нужные плагины на паузу и с паузы прописала, но вот эта строчка не понятная:( night_load night_dm.amxx - вот так что ли надо?