Участник
Пользователь
- Сообщения
- 460
- Реакции
- 68
- Помог
- 7 раз(а)
- Ошибка
-
Кратко хочу объяснить ситуацию стоит плагин https://dev-cs.ru/threads/1634/page-4#post-20472 я туда прикрутил демейджинг. И когда кончается разминка плагин не стопается а работает дальше и демейджинг в свою очередь с ним. Мне нужно как то его остановить потому как у меня стоит другой плагин вывода демейджинга https://goldsrc.ru/threads/127/ и получается что он выводит с обеих плагинов урон после окончания разминки.
- ОС
- Windows
- Amx Mod X
-
AMX Mod X 1.9.0.5241 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jan 30 2019 07:09:20
Built from: https://github.com/alliedmodders/amxmodx/commit/21100375
Build ID: 5241:21100375
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7 (cstrike)
ReHLDS version: 3.4.0.669-dev
Build date: 18:21:09 Mar 29 2019 (1812)
Build from: https://github.com/dreamstalker/rehlds/commit/f6822e3
- ReGamedll
-
ReGameDLL version: 5.7.0.327-dev
Build date: 14:56:22 Apr 9 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d674924
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
[ 1] VoiceTranscoder RUN - voicetranscoder.dll v2017RC3 ini ANY ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.133 ini Start Never
[ 3] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl ANY
[ 4] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5241 ini Start ANY
[ 5] WHBlocker RUN - whblocker_mm.dll v1.5.696 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 7] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start Never
[ 8] SQLite RUN - sqlite_amxx.dll v1.9.0.5241 pl4 ANY ANY
[ 9] ReAPI RUN - reapi_amxx.dll v5.8.0.165-dev pl4 ANY Never
[10] Engine RUN - engine_amxx.dll v1.9.0.5241 pl4 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5241 pl4 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5241 pl4 ANY ANY
[13] ReAimDetector RUN - reaimdetector_amxx.dll v0.2.2 pl4 ANY Never
13 plugins, 13 running
- Список плагинов
-
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] Aliases checker 1.0.3 kanagava alias_detector. running
[ 3] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 4] FreshBans 1.3.9b kanagava fresh_bans_139_ running
[ 5] ScreenMaker 1.1 neygomon screen_maker.am running
[ 6] RC BaseChanger 1.0 phe rc_basechanger. stopped
[ 7] ReChecker Logging 1.0 custom rc_logging.amxx running
[ 8] Lite Admin ESP 1.1 neygomon, AcE admin_esp_ace.a running
[ 9] Admin Base 1.9.0.5241 AMXX Dev Team admin.amxx running
[ 10] Ping Control 1.4 neygomon Ping_Control.am running
[ 11] AFK Control 1.4.1 [Rnd neygomon afk_control_Rnd running
[ 12] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 13] Stats Configuration 1.10.0.525 AMXX Dev Team statscfg.amxx running
[ 14] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 15] Advanced MapChooser 1.4 neygomon map_chooser.amx running
[ 16] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 17] Items Restrict 1.0 s1lent items_restrict. running
[ 18] RE Me&HP 1.1 neygomon, AcE re_sayme.amxx running
[ 19] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 20] Radio Hudmsg Block 1.0 AcE radio_hudmsg_bl running
[ 21] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 22] Parachute Lite [ReAPI] 11.0 Leo_[BH] parachute_lite. running
[ 23] Lite C4 Timer 1.0.0 neygomon lite_c4timer.am running
[ 24] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 25] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 26] Players Menu 1.7 neugomon players_menu.am running
[ 27] [ReAPI] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 28] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 29] BlockNick Spam 1.0 [Re] R BlockNick_Spam. running
[ 30] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 31] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_rank running
[ 32] Adverts 1.0 pUzzlik adverts_message running
[ 33] BunnyHop 1.0 PurposeLess bunnyhop.amxx paused
[ 34] SpecList 1.2a FatalisDK speclist.amxx running
[ 35] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 36] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
[ 37] Advanced MapChooser 1.4 neygomon map_chooser_CSD paused
[ 38] ReCSDM Team Balance 1.0.3 the_hunter recsdm_team_bal paused
[ 39] RE Me&HP 1.1 neygomon, AcE re_sayme_csdm.a paused
[ 40] Lite Translit 2.8 neygomon lite_translit_c debug
[ 41] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 42] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 43] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 44] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 45] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 46] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 47] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 48] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 49] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 50] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 51] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
51 plugins, 46 running
- Автор плагина
- neugomon/h1k3
- Версия плагина
- [ReAPI] Random Weapons WarmUP", "2.4.9"
- Исходный код
-
#include <amxmodx>
#include <reapi>
/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#define TIME_RR 60 // Время разминки
#define NUM_RR 1 // Кол-во рестартов
#define LATENCY 1.5 // Задержка между рестартами
#define DM_MODE 1 // Возрождение после смерти; 0 - отключить (будет длится раунд или до победы)
#define PROTECTED 2 // Сколько секунд действует защита после возрождения (актуально для DM_MODE); 0 - отключить
#define SOUND // Музыка под час разминки
#define STOP_PLUGS // Отключать плагины на время разминки
#define OFF_RR // Отключать этот плагин на указанных картах
#define REMOVE_MAP_WPN // Удалять ентити мешающие разминке на картах типа: awp_, 35hp_ и т.п. [по умолчанию выкл.]
//#define BLOCK // Запрет поднятия оружия с земли (не актуально при вкл. #define REMOVE_MAP_WPN) [по умолчанию выкл.]
#define STOP_STATS // Отключать запись статистики на время разминки CSStatsX SQL by serfreeman1337 0.7.4+1 [по умолчанию выкл.]
/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#if defined REMOVE_MAP_WPN
#include <hamsandwich>
#endif
#define WALLS_VISIBLE
#if !defined WALLS_VISIBLE
#include fakemeta_util
#endif
new g_MsgSync1, g_MsgSync2;
#if defined SOUND
new const soundRR[][] = // Указывать звук, например 1.mp3
{
"sound/start_sound/RoundStart.mp3",
// "sound/rww/2.mp3",
// "sound/rww/3.mp3"
}
#endif
#if defined STOP_PLUGS
new g_arPlugins[][] = // Указывать название плагинов для отключения, например test.amxx
{
"Time_For_Info_HUD.amxx",
"knife_duel.amxx",
"speclist_rus.amxx",
"round_balancer.amxx",
"awp_off.amxx",
"reapi_awp_limitter.amxx",
"lite_c4timer.amxx",
"adverts_message.amxx",
"mode.amxx",
"sayme_reapi.amxx",
"aes_bonus_system.amxx",
"aes_bonus_cstrike.amxx",
"items_restrict.amxx",
"custom_deagle.amxx",
"custom_m4a1.amxx",
"custom_ak47.amxx",
"custom_awp.amxx",
"vip_custom.amxx"
}
public CBasePlayer_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if(!is_user_connected(attacker))
return;
if(!rg_is_player_can_takedamage(victim, attacker))
return;
if(get_member(victim, m_iTeam) == get_member(attacker, m_iTeam)) // if FFa, remove...
return;
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1);
ShowSyncHudMsg(victim, g_MsgSync1, "%.0f", damage);
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1);
#if defined WALLS_VISIBLE
ShowSyncHudMsg(attacker, g_MsgSync2, "%.0f", damage);
#else
if(fm_is_ent_visible(attacker, victim))
ShowSyncHudMsg(attacker, g_MsgSync2, "%.0f", damage);
#endif
}
#endif
#if DM_MODE == 0
new HookChain:fwd_RRound;
new g_iRound;
#endif
#if defined REMOVE_MAP_WPN
new HamHook:fwd_Equip,
HamHook:fwd_WpnStrip,
HamHook:fwd_Entity;
#endif
#if defined STOP_STATS
new g_iHudSync;
#endif
new g_szWeapon[32];
new g_iImmunuty, g_iRespawn, g_iWp, g_iHudSync2;
new HookChain:fwd_NewRound,
#if defined BLOCK
HookChain:fwd_BlockEntity,
#endif
HookChain:fwd_Spawn,
HookChain:fwd_GiveC4;
const TASK_TIMER_ID = 33264;
public plugin_init()
{
register_plugin("[ReAPI] Random Weapons WarmUP", "2.4.9", "neugomon/h1k3");
RegisterHookChain(RG_RoundEnd, "fwdRoundEnd", true);
DisableHookChain(fwd_NewRound = RegisterHookChain(RG_CSGameRules_CheckMapConditions, "fwdRoundStart", true));
DisableHookChain(fwd_Spawn = RegisterHookChain(RG_CBasePlayer_Spawn, "fwdPlayerSpawnPost", true));
DisableHookChain(fwd_GiveC4 = RegisterHookChain(RG_CSGameRules_GiveC4, "fwdGiveC4", false));
#if defined REMOVE_MAP_WPN
DisableHamForward(fwd_Equip = RegisterHam(Ham_Use, "game_player_equip", "CGamePlayerEquip_Use", false));
DisableHamForward(fwd_WpnStrip = RegisterHam(Ham_Use, "player_weaponstrip", "CStripWeapons_Use", false));
DisableHamForward(fwd_Entity = RegisterHam(Ham_CS_Restart, "armoury_entity", "CArmoury_Restart", false));
RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage", true);
g_MsgSync1=CreateHudSyncObj();
g_MsgSync2=CreateHudSyncObj();
#endif
#if DM_MODE == 0
EnableHookChain(fwd_RRound = RegisterHookChain(RG_CSGameRules_RestartRound, "fwdRestartRound_Pre"));
#endif
#if defined BLOCK
DisableHookChain(fwd_BlockEntity = RegisterHookChain(RG_CBasePlayer_HasRestrictItem, "fwdHasRestrictItemPre", false));
register_clcmd("drop", "ClCmd_Drop");
#endif
g_iImmunuty = get_cvar_pointer("mp_respawn_immunitytime");
g_iRespawn = get_cvar_pointer("mp_forcerespawn");
#if defined STOP_STATS
g_iHudSync = CreateHudSyncObj();
#endif
g_iHudSync2 = CreateHudSyncObj();
state warmupOff;
#if defined OFF_RR
new sPref[][] = { "awp_", "aim_", "35hp", "scout" }; // Указывать префиксы карт на которых плагин не будет работать
new map[32]; get_mapname(map, charsmax(map));
for(new i; i < sizeof sPref; i++)
{
if(containi(map, sPref[i]) != -1)
{
pause("ad");
return;
}
}
#endif
}
public plugin_end() <warmupOff> {}
public plugin_end() <warmupOn>
{
finishWurmUp();
}
#if defined BLOCK
public fwdHasRestrictItemPre()
{
SetHookChainReturn(ATYPE_INTEGER, true);
return HC_SUPERCEDE;
}
public ClCmd_Drop() <warmupOff>
return PLUGIN_CONTINUE;
public ClCmd_Drop() <warmupOn>
return PLUGIN_HANDLED;
#endif
#if defined SOUND
public plugin_precache()
{
for(new i = 0; i < sizeof(soundRR); i++)
{
precache_generic(soundRR[i]);
}
}
#endif
public fwdRoundEnd(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay)
if(event == ROUND_GAME_COMMENCE)
EnableHookChain(fwd_NewRound);
public fwdRoundStart()
{
state warmupOn;
#if defined REMOVE_MAP_WPN
EnableHamForward(fwd_Equip);
EnableHamForward(fwd_WpnStrip);
EnableHamForward(fwd_Entity);
#endif
DisableHookChain(fwd_NewRound);
EnableHookChain(fwd_Spawn);
EnableHookChain(fwd_GiveC4);
set_pcvar_num(g_iRespawn, DM_MODE);
set_pcvar_num(g_iImmunuty, PROTECTED);
#if DM_MODE >= 1
set_cvar_string("mp_round_infinite", "1");
set_task(1.0, "Show_Timer", .flags = "a", .repeat = TIME_RR);
#endif
#if DM_MODE == 0
set_task(1.0, "Hud_Message", .flags = "a", .repeat = 25 );
#endif
#if defined SOUND
static cmd[64];
formatex(cmd, 63, "mp3 play ^"%s^"", soundRR[random(sizeof(soundRR))]);
client_cmd(0, "%s", cmd);
#endif
#if defined STOP_STATS
set_cvar_num("csstats_pause", 1);
#endif
#if defined BLOCK
EnableHookChain(fwd_BlockEntity);
#endif
#if defined STOP_PLUGS
PluginController(1);
#endif
switch(g_iWp = random(6))
{
case 0: formatex(g_szWeapon, charsmax(g_szWeapon), "Steyr Scout");
case 1: formatex(g_szWeapon, charsmax(g_szWeapon), "M4A1");
case 2: formatex(g_szWeapon, charsmax(g_szWeapon), "AK-47");
case 3: formatex(g_szWeapon, charsmax(g_szWeapon), "MP5");
case 4: formatex(g_szWeapon, charsmax(g_szWeapon), "Ножах");
case 5: formatex(g_szWeapon, charsmax(g_szWeapon), "USP");
}
}
public fwdPlayerSpawnPost(const id)
{
if(!is_user_alive(id))
return;
#if defined REMOVE_MAP_WPN
InvisibilityArmourys();
#endif
BuyZone_ToogleSolid(SOLID_NOT);
rg_remove_all_items(id);
set_member_game(m_bMapHasBuyZone, true);
rg_give_item(id, "weapon_knife");
switch(g_iWp)
{
case 0:
{
rg_give_item(id, "weapon_scout");
rg_set_user_bpammo(id, WEAPON_SCOUT, 90);
rg_give_item(id, "weapon_knife");
}
case 1:
{
rg_give_item(id, "weapon_m4a1");
rg_set_user_bpammo(id, WEAPON_M4A1, 90);
rg_give_item(id, "weapon_knife");
}
case 2:
{
rg_give_item(id, "weapon_ak47");
rg_set_user_bpammo(id, WEAPON_AK47, 90);
rg_give_item(id, "weapon_knife");
}
case 3:
{
rg_give_item(id, "weapon_mp5navy");
rg_set_user_bpammo(id, WEAPON_MP5N, 120);
rg_give_item(id, "weapon_knife");
}
case 4:
{
rg_set_user_armor(id, 35, ARMOR_VESTHELM);
set_entvar(id, var_health, 35.0);
}
case 5:
{
rg_give_item(id, "weapon_usp");
rg_set_user_bpammo(id, WEAPON_USP, 90);
rg_give_item(id, "weapon_knife");
}
}
}
public fwdGiveC4()
{
return HC_SUPERCEDE;
}
#if DM_MODE >= 1
public Show_Timer()
{
static timer = -1;
if(timer == -1) timer = TIME_RR;
switch(--timer)
{
case 0:
{
finishWurmUp();
timer = -1;
}
default:
{
#if defined STOP_STATS
set_hudmessage(255, 0, 0, .x = -1.0, .y = 0.05, .holdtime = 0.9, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync, "[Статистика Отключена]");
#endif
set_hudmessage(255, 69, 0, .x = -1.0, .y = 0.08, .holdtime = 0.9, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync2, "Разминка на %s!^nРестарт через %d сек", g_szWeapon, timer);
}
}
}
#endif
#if DM_MODE == 0
public fwdRestartRound_Pre()
{
g_iRound++;
if(g_iRound >= 2) {
DisableHookChain(fwd_RRound);
finishWurmUp();
}
}
public Hud_Message()
{
#if defined STOP_STATS
set_hudmessage(255, 0, 0, .x = -1.0, .y = 0.05, .holdtime = 0.9, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync, "[Статистика Отключена]");
#endif
set_hudmessage(255, 69, 0, .x = -1.0, .y = 0.08, .holdtime = 0.9, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync2, "Разминка на %s!", g_szWeapon);
}
#endif
public SV_Restart()
{
set_cvar_num("sv_restart", 1);
set_task(2.0, "End_RR");
}
public End_RR()
{
#if defined STOP_STATS
set_hudmessage(0, 255, 0, .x = -1.0, .y = 0.05, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync, "[Статистика Включена]");
#endif
set_hudmessage(0, 255, 255, .x = -1.0, .y = 0.08, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync2, "Разминка Окончена!^nПриятной Игры!");
for(new i = 1; i <= MaxClients; i++)
{
if(is_user_alive(i))
{
rg_remove_items_by_slot(i, PRIMARY_WEAPON_SLOT);
}
}
}
#if defined REMOVE_MAP_WPN
public CArmoury_Restart(const pArmoury)
{
return HAM_SUPERCEDE;
}
public CGamePlayerEquip_Use()
{
return HAM_SUPERCEDE;
}
public CStripWeapons_Use()
{
return HAM_SUPERCEDE;
}
InvisibilityArmourys()
{
new pArmoury = NULLENT
while((pArmoury = rg_find_ent_by_class(pArmoury, "armoury_entity")))
{
if(get_member(pArmoury, m_Armoury_iCount) > 0)
{
set_entvar(pArmoury, var_effects, get_entvar(pArmoury, var_effects) | EF_NODRAW)
set_entvar(pArmoury, var_solid, SOLID_NOT)
set_member(pArmoury, m_Armoury_iCount, 0)
}
}
}
#endif
finishWurmUp()
{
state warmupOff;
BuyZone_ToogleSolid(SOLID_TRIGGER);
#if defined REMOVE_MAP_WPN
DisableHamForward(fwd_Equip);
DisableHamForward(fwd_WpnStrip);
DisableHamForward(fwd_Entity);
#endif
DisableHookChain(fwd_Spawn);
DisableHookChain(fwd_GiveC4);
set_cvar_string("mp_forcerespawn", "0");
set_cvar_string("mp_respawn_immunitytime", "0");
set_cvar_string("mp_round_infinite", "0");
#if defined STOP_STATS
set_cvar_num("csstats_pause", 0);
#endif
#if defined BLOCK
DisableHookChain(fwd_BlockEntity);
#endif
#if defined STOP_PLUGS
PluginController(0);
#endif
#if NUM_RR > 1
set_task(LATENCY, "SV_Restart", .flags = "a", .repeat = NUM_RR);
#else
SV_Restart();
#endif
remove_task(TASK_TIMER_ID);
}
stock PluginController(stop)
{
for(new i; i < sizeof g_arPlugins; i++)
{
if(stop)pause ("ac", g_arPlugins[i]);
else unpause("ac", g_arPlugins[i]);
}
}
stock BuyZone_ToogleSolid(const solid)
{
new entityIndex = 0;
while ((entityIndex = rg_find_ent_by_class(entityIndex, "func_buyzone")))
set_entvar(entityIndex, var_solid, solid);
}
Решение для меня очень трудное( Не знаю как отловить событие и остановить роботу плагина.
В этой теме было размещено решение! Перейти к решению.