- Ошибка
-
нет
- ОС
- Linux
- Amx Mod X
-
Amx Mod X 1.9.0.5263
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.10.0.761-dev
Build date: 14:03:01 Jul 25 2021 (2661)
Build from: https://github.com/dreamstalker/rehlds/commit/aaffe43
- ReGamedll
-
"game_version" is "5.20.0.525-dev"
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
[ 1] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 8] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[11] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[13] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.19.0.210-dev pl5 ANY Never
16 plugins, 16 running
- Список плагинов
-
[ 1] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 2] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 3] [GRENADE] Molotov 1.0.2 medusa grenade_molotov running
[ 4] FreshBan 0.9.7b kanagava fresh_bans.amxx running
[ 5] fb_forwards 0.1.5 Kanagava & Realu fb_forwards.amx running
[ 6] RC BaseChanger freesrv custom rc_basechanger. stopped
[ 7] ReChecker Logging freesrv custom rc_logging.amxx running
[ 8] Admin Loader 3.5 neygomon admin_loader.am running
[ 9] Advanced Client Checke 0.3.6 Mistrick advanced_client running
[ 10] BhopHack Detector 0.1 Mistrick bhophack_detect running
[ 11] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 12] [190] MapChooser RBS 20.08.02 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 13] Maps Menu 20.06.06 SKAJIbnEJIb & AM mapsmenu_rbs.am running
[ 14] [190] AdminChat RBS 20.06.06 SKAJIbnEJIb adminchat_rbs.a running
[ 15] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 16] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 17] Players Menu 1.7 neugomon plmenu.amxx running
[ 18] Slots Reservation 1.9.0.5271 AMXX Dev Team adminslots.amxx running
[ 19] Ultimate Chats Control 5.2(c) neygomon ucc.amxx running
[ 20] unknown unknown unknown ucc_api_example running
[ 21] UCC Addon: VoteGAG 1.2 neygomon ucc_votegag.amx running
[ 22] [190] Ultimate Weapons 21.03.23 SKAJIbnEJIb ultimate_weapon running
[ 23] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 24] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 25] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 26] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 27] Menus Front-End 1.5 neugomon menufront_end.a running
[ 28] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 29] [190] Stimulation RBS 20.06.06 SKAJIbnEJIb stimulation_rbs running
[ 30] [190] Maps Helper 20.06.06 SKAJIbnEJIb maps_helper.amx running
[ 31] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 32] Lite Translit 2.8 neygomon lite_translit.a running
[ 33] NameChangeTime 0.0.1 Vaqtincha block_change_ni running
[ 34] GameName Changer 1.0.0 Nordic Warrior GameNameChanger running
[ 35] [182] NextMap 18.09.25 SKAJIbnEJIb & AM nextmap.amxx running
[ 36] [182] TimeLeft 18.09.25 SKAJIbnEJIb & AM timeleft.amxx running
[ 37] [AMXX] Item: Heal Inje 0.0.2x xxx injector.amxx debug
[ 38] [190] Warmup RBS 21.03.23 SKAJIbnEJIb warmup_rbs.amxx running
[ 39] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 40] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 41] Say me and Say hp 1.4 neygomon sayme_reapi.amx running
[ 42] CS Stats Logging 1.9.0.5271 AMXX Dev Team stats_logging.a running
[ 43] [ReAPI] Kill Sounds 0.1 mx?! kill_sounds.amx running
[ 44] Lite Recoder 1.0.1 neygomon lite_recoder.am running
[ 45] Style C4 Timer 3.1 OciXCrom crx_c4timer.amx running
[ 46] Mode 2x2 2.5re
s1lent mode.amxx running
[ 47] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 48] Doctor service 0.2 (BETA) uMk0 doctor_service. running
[ 49] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. running
[ 50] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 51] Server Menu 0.1 maFFyoZZyk menu.amxx running
[ 52] [190] First Players Re 20.06.06 SKAJIbnEJIb FirstPlayersRes running
[ 53] Reset Score 0.0.2f wopox1337 ResetScore.amxx running
[ 54] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx debug
[ 55] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 56] Custom Models 1.3.2 neugomon custom_models.a running
[ 57] Items Restrict 1.1 s1lent items_restrict. running
[ 58] Custom Smoke 1.08 bionext custom_smoke.am running
[ 59] Hostage no death T 1.0 Brute hostage_no_deat running
[ 60] [190] Parachute RBS 20.06.06 SKAJIbnEJIb & KR parachute_rbs.a running
[ 61] Block cheat key 2.1 FIX 9 rpamm!? block_key_2.1_F running
[ 62] recoil_manager 1.0.0 fl0wer recoil_manager. running
[ 63] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 64] NO_FITH_TEXT 1.1w perf No_fith_text.am running
[ 65] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 66] Simple Grenade Trail 1.0 seroff granade_trail.a running
[ 67] Ping Control 1.31 neygomon Ping_Control.am running
[ 68] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 69] Reklama 20.05.2020 mx?! reklama.amxx running
[ 70] [190] Block Reconnect 20.06.06 ShaTalKiN Block_Reconnect running
[ 71] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 72] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 73] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 74] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 75] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 76] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 77] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 78] Custom Weapons API 0.5.2-beta ArKaNeMaN CustomWeaponsAP running
[ 79] [CWAPI] Spawn Items 1.1.0 ArKaNeMaN CWAPI_SpawnItem running
[ 80] [CWAPI] Vip Weapons 1.2.0 ArKaNeMaN VipWeapons.amxx running
[ 81] Vip Health 1.1.0 ArKaNeMaN VipHealth.amxx running
81 plugins, 80 running
- Автор плагина
- neygomon + h1k3
- Версия плагина
- WarmUP 2.4.9
- Исходный код
-
#include <amxmodx>
#include <reapi>
/*¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦*/
#define TIME_RR 60 // Время разминки
#define NUM_RR 2 // Кол-во рестартов
#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
#if defined SOUND
new const soundRR[][] = // Указывать звук, например 1.mp3
{
"sound/rww/fight.mp3",
// "sound/rww/2.mp3",
// "sound/rww/3.mp3"
}
#endif
#if defined STOP_PLUGS
new g_arPlugins[][] = // Указывать название плагинов для отключения, например test.amxx
{
"aes_bonus_system.amxx",
"aes_bonus_cstrike.amxx",
"crx_c4timer.amxx",
"best_player_of_the_round.amxx",
"sayme_reapi.amxx",
"CustomWeaponsAPI.amxx",
"VipWeapons.amxx",
"nice_killer.amxx",
"team_grenade_trail.amxx",
"VipHealth.amxx",
"ultimate_flags.amxx",
"stimulation_rbs.amxx",
"maps_helper.amxx",
"doctor_service.amxx",
"injector.amxx",
"steam_bonus_a2.amxx",
"reapi_healthnade.amxx",
"grenade_effects.amxx",
"granade_trail.amxx",
"grenade_molotov.amxx",
"FirstPlayersRespawn.amxx",
"ultimate_weapons.amxx",
"knife_duel.amxx"
}
#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));
#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_", "fy_", "$", "cs_", "35hp" }; // Указывать префиксы карт на которых плагин не будет работать
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(0))
{
case 0: formatex(g_szWeapon, charsmax(g_szWeapon), "Ножах");
}
}
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_knife");
set_entvar(id, var_health, 35.0);
}
}
}
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(135, 206, 235, .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(135, 206, 235, .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(255, 0, 0, .x = -1.0, .y = 0.05, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync, "[Статистика Включена]");
#endif
set_hudmessage(135, 206, 235, .x = -1.0, .y = 0.08, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync2, "Разминка окончена!");
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);
}
Добрый день!Поставил данный плагин,отредактировал(оставил только разминку на ножах,накосячил 100%).Разминка на ножах работает,но есть проблемы:
Свечение игрока остается.
не выдает все грены после разминки.
Пожалуйста,помогите разобраться что не так.Код с которым я мог "накосячить"
Свечение игрока остается.
Код:
#include <amxmodx>
#include <reapi>
/*¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦*/
#define TIME_RR 60 // Время разминки
#define NUM_RR 2 // Кол-во рестартов
#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
#if defined SOUND
new const soundRR[][] = // Указывать звук, например 1.mp3
{
"sound/rww/fight.mp3",
// "sound/rww/2.mp3",
// "sound/rww/3.mp3"
}
#endif
#if defined STOP_PLUGS
new g_arPlugins[][] = // Указывать название плагинов для отключения, например test.amxx
{
"aes_bonus_system.amxx",
"aes_bonus_cstrike.amxx",
"crx_c4timer.amxx",
"best_player_of_the_round.amxx",
"sayme_reapi.amxx",
"CustomWeaponsAPI.amxx",
"VipWeapons.amxx",
"nice_killer.amxx",
"team_grenade_trail.amxx",
"VipHealth.amxx",
"ultimate_flags.amxx",
"stimulation_rbs.amxx",
"maps_helper.amxx",
"doctor_service.amxx",
"injector.amxx",
"steam_bonus_a2.amxx",
"reapi_healthnade.amxx",
"grenade_effects.amxx",
"granade_trail.amxx",
"grenade_molotov.amxx",
"FirstPlayersRespawn.amxx",
"ultimate_weapons.amxx",
"knife_duel.amxx"
}
#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));
#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_", "fy_", "$", "cs_", "35hp" }; // Указывать префиксы карт на которых плагин не будет работать
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(0))
{
case 0: formatex(g_szWeapon, charsmax(g_szWeapon), "Ножах");
}
}
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_knife");
set_entvar(id, var_health, 35.0);
}
}
}
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(135, 206, 235, .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(135, 206, 235, .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(255, 0, 0, .x = -1.0, .y = 0.05, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync, "[Статистика Включена]");
#endif
set_hudmessage(135, 206, 235, .x = -1.0, .y = 0.08, .holdtime = 5.0, .channel = -1);
ShowSyncHudMsg(0, g_iHudSync2, "Разминка окончена!");
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);
}
В этой теме было размещено решение! Перейти к решению.