Код:
[ 1] FreshBans 1.3.7b kanagava fresh_bans.amxx running
[ 2] Team Revive 2.0 GHW_Chronic Admin-Revive.am running
[ 3] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 4] SpecList 1.2a SasaiLalka speclist_rus.am running
[ 5] [Customizable] AmxModM 0.0.5 Albertio amxmodmenu.amxx running
[ 6] [190] Ultimate Weapons 22.11.15 SKAJIbnEJIb ultimate_weapon running
[ 7] Admin Commands 1.9.0-dev+ AMXX Dev Team admincmd.amxx остановлен
[ 8] Slots Reservation 1.9.0-dev+ AMXX Dev Team adminslots.amxx running
[ 9] Multi-Lingual System 1.9.0-dev+ AMXX Dev Team multilingual.am running
[ 10] Commands Menu 1.9.0-dev+ AMXX Dev Team cmdmenu.amxx остановлен
[ 11] Players Menu 1.9.0-dev+ AMXX Dev Team plmenu.amxx остановлен
[ 12] Maps Menu 1.9.0-dev+ AMXX Dev Team mapsmenu.amxx running
[ 13] Admin Chat 1.9.0-dev+ AMXX Dev Team adminchat.amxx running
[ 14] Anti Flood 1.9.0-dev+ AMXX Dev Team antiflood.amxx running
[ 15] Scrolling Message 1.9.0-dev+ AMXX Dev Team scrollmsg.amxx running
[ 16] Info. Messages 1.9.0-dev+ AMXX Dev Team imessage.amxx running
[ 17] Admin Votes 1.9.0-dev+ AMXX Dev Team adminvote.amxx остановлен
[ 18] NextMap 1.9.0-dev+ AMXX Dev Team nextmap.amxx running
[ 19] TimeLeft 1.9.0-dev+ AMXX Dev Team timeleft.amxx running
[ 20] Pause Plugins 1.9.0-dev+ AMXX Dev Team pausecfg.amxx running
[ 21] Players Menu 22.11.15 SKAJIbnEJIb & AM admincmd_rbs.am running
[ 22] [190] Ultimate Flags 22.11.15 SKAJIbnEJIb ultimate_flags. running
[ 23] Commands Menu 20.06.06 SKAJIbnEJIb & AM cmdmenu_rbs.amx running
[ 24] [190] Replace Weapons 20.06.06 SKAJIbnEJIb replace_weapons running
[ 25] [190] FG RconShop 21.09.12 SKAJIbnEJIb fg_rconshop.amx running
[ 26] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 27] [190] CsStats MySQL 22.11.15 SKAJIbnEJIb csstats_mysql.a running
[ 28] Parachute Lite [ReAPI] 11.0 Leo_[BH] parachute.amxx running
[ 29] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 30] Admin Chat 1.8.2 AMXX Dev Team AdminChat.amxx running
[ 31] mute 1.0 Aziz mute.amxx running
[ 32] [190] High Ping Kicker 20.06.06 SKAJIbnEJIb hpk_rbs.amxx running
[ 33] [190] AC Spectator ESP 20.06.06 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 34] [190] Stuck RBS 20.06.06 SKAJIbnEJIb & NL stuck_rbs.amxx running
[ 35] HudTextArgs Blocker 1.1 joaquimandrade hud_text_blocke running
[ 36] Reset Score 1.0 Silenttt resetscore-new. running
[ 37] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 38] Injector X 1.0 Deadly|Darkness inj.amxx running
[ 39] Killa HP 1.0 jas0n killa_hp.amxx running
[ 40] AWPoff 4.0 PAffAEJIkA :3 awpoff.amxx running
[ 41] Admin Gag 1.0 AndrewZ admin_gag.amxx running
[ 42] aga 1.0 Got Milk? nice_killer.amx running
[ 43] Weapon Skin System 0.6.0-50 Mistrick weapon_skin_sys running
[ 44] Awersome Messages 0.3 F@nt0M aw_messages.amx running
[ 45] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 46] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 47] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 48] GameName Changer 1.0.0 Nordic Warrior GameNameChanger running
[ 49] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 50] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 51] Ultimate Revive 1.0.7 twisterniq ultimate_revive running
[ 52] [Talisman Modular] Cor 1.0 beta ImmortalAmxx AmxxTalismanCor running
[ 53] [Talisman Modular] Giv 1.0 beta ImmortalAmxx AmxxTalismanGiv running
[ 54] Restrict Weapons 20.06.06 SKAJIbnEJIb & AM restmenu_rbs.am running
[ 55] [Talisman Modular] Giv 1.0 beta ImmortalAmxx AmxxTalismanGiv running
[ 56] [Talisman Modular] Not 1.0 beta ImmortalAmxx AmxxTalismanNot running
[ 57] Advanced MapChooser 1.4 neygomon advanced_mapcho running
[ 58] Team Grenade Trail 1.2 Numb team_grenade_tr running
[ 59] (Team-)Semiclip 1.2 SchlumPF*/Empowe anti_block.amxx running
[ 60] Knife Duel 1.0 Alka knife_duel.amxx running
[ 61] Last Round 1.0 bAnTAi lastround.amxx running
[ 62] [GM] Check Cheats 0.0.2b [GM] NWC gm_check_cheats running
[ 63] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 64] Mode 2x2 2.5re s1lent mode.amxx running
[ 65] [190] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
[ 66] [190] Ultimate Informe 21.03.23 SKAJIbnEJIb ultimate_inform running
[ 67] [190] Chat Addons 20.06.06 SKAJIbnEJIb chat_addons.amx running
[ 68] [190] StatsX RBS 21.03.23 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 69] Stats Configuration 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 70] [190] Skill ELO 22.11.15 SKAJIbnEJIb skill_elo.amxx running
[ 71] Give ADMIN 1.1 Xander give_admin_1.1. running
[ 72] Damager 1.0 Prayer damager.amxx running
[ 73] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 74] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
Код:
#include <amxmodx>
#include <reapi>
/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
#define TIME_RR 40 // Время разминки
#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/RoundStart.mp3",
// "sound/rww/2.mp3",
// "sound/rww/3.mp3"
}
#endif
#if defined STOP_PLUGS
new g_arPlugins[][] = // Указывать название плагинов для отключения, например test.amxx
{
"test.amxx",
"test2.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(8))
{
case 0: formatex(g_szWeapon, charsmax(g_szWeapon), "M4A1");
case 1: formatex(g_szWeapon, charsmax(g_szWeapon), "AK-47");
case 2: formatex(g_szWeapon, charsmax(g_szWeapon), "МP5");
case 3: formatex(g_szWeapon, charsmax(g_szWeapon), "SG-550");
case 4: formatex(g_szWeapon, charsmax(g_szWeapon), "Famas");
case 5: formatex(g_szWeapon, charsmax(g_szWeapon), "SCOUT");
case 6: formatex(g_szWeapon, charsmax(g_szWeapon), "XM1014");
case 7: formatex(g_szWeapon, charsmax(g_szWeapon), "M3");
}
}
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_m4a1");
rg_set_user_bpammo(id, WEAPON_M4A1, 90);
}
case 1:
{
rg_give_item(id, "weapon_ak47");
rg_set_user_bpammo(id, WEAPON_AK47, 90);
}
case 2:
{
rg_give_item(id, "weapon_mp5navy");
rg_set_user_bpammo(id, WEAPON_MP5N, 120);
}
case 3:
{
rg_give_item(id, "weapon_sg550");
rg_set_user_bpammo(id, WEAPON_SG550, 90);
}
case 4:
{
rg_give_item(id, "weapon_famas");
rg_set_user_bpammo(id, WEAPON_FAMAS, 90);
}
case 5:
{
rg_give_item(id, "weapon_scout");
rg_set_user_bpammo(id, WEAPON_SCOUT, 30);
}
case 6:
{
rg_give_item(id, "weapon_xm1014");
rg_set_user_bpammo(id, WEAPON_XM1014, 50);
}
case 7:
{
rg_give_item(id, "weapon_m3");
rg_set_user_bpammo(id, WEAPON_M3, 50);
}
}
}
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);
}