Избыточное форматирование/капслок
- Ошибка
-
не работает
- ОС
- Windows
- Amx Mod X
-
1.90
- Билд
-
rehlds
- ReGamedll
-
ReGameDLL version: 5.21.0.546-dev
- Версия Metamod
-
Metamod v1.21p37 2013/05/30 (5:13)
- Список метамодулей
-
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 2] VoiceTranscoder RUN - VoiceTranscoder. v2020MA2 ini ANY ANY
[ 3] HitBox Fix RUN - hitbox_fix_mm_i3 v1.1.2 ini Start ANY
[ 4] Reunion RUN - reunion_mm_i386. v0.1.92d ini Start Never
[ 5] dproto_EF fail - dproto_i386.so v0.9.391 ini Start Never
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 7] ReAPI RUN - reapi_amxx_i386. v5.22.0. pl1 ANY Never
[ 8] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl1 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl1 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl1 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[12] Engine RUN - engine_amxx_i386 v1.9.0.5 pl1 ANY ANY
[13] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl1 ANY ANY
[14] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl1 ANY ANY
- Список плагинов
-
[ 1] AMXBans: Core 1.9.0 MA: 1.6.14 Larte Team amxbans_core.am running
[ 2] AMXBans: Main 1.9.0 MA: 1.6.14 Larte Team amxbans_main.am running
[ 3] AMXBans: Flagged 1.9.0 MA: 1.6.14 Larte Team amxbans_flagged running
[ 4] AMXBans: Freeze 1.9.0 MA: 1.6.14 Larte Team amxbans_freeze. running
[ 5] AMXBans: Screens 1.9.0 MA: 1.6.14 Larte Team amxbans_ssban.a running
[ 6] Gag Me 2.4.0 Radius gag_me.amxx running
[ 7] CSStatsX SQL 0.7.4+2 serfreeman1337 aes_csstatsx_sq running
[ 8] Advanced Experience Sy 0.5 Vega serfreeman1337 advanced_experi running
[ 9] FreshBans 1.4.7b kanagava fresh_bans.amxx running
[ 10] [190] Warmup RBS 21.03.23 SKAJIbnEJIb warmup_rbs.amxx running
[ 11] Plugins Core 1.3.0 Radius plugins_core.am running
[ 12] AWP Restrictions 1.6.0 Radius awp_restriction running
[ 13] Change Game Name 1.2 ReHLDS Team change_game_nam running
[ 14] Multi-Lingual System 1.9.0.5235 AMXX Dev Team multilingual.am running
[ 15] [ReAPI] Hint blocker 0.1.0 F@tn0M reapi_hint_bloc running
[ 16] [190] NextMap 18.09.25 SKAJIbnEJIb & AM nextmap.amxx running
[ 17] [182] MapChooser RBS 20.08.02 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 18] [190] AC Spectator ESP 20.06.06 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 19] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 20] Reset Score 0.2 Silenttt / CepeH RESET_SCORE_V0. running
[ 21] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a running
[ 22] Mode 2x2 2.5re s1lent mode_2x2.amxx running
[ 23] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash_l running
[ 24] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 25] Lite Translit 2.8 neygomon lite_translit_c running
[ 26] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 27] Replace Info Message 2.3 maeStro aka 9iky replace_info_me running
[ 28] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 29] recoil_manager 1.0.0 fl0wer recoil_manager. running
[ 30] Players Menu 1.7 neugomon players_menu.am running
[ 31] Lite Admin ESP 1.0 neygomon lite_admin_esp. running
[ 32] Lite VoteBan 1.4fix neygomon lite_voteban.am running
[ 33] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 34] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 35] SpecList 1.2a FatalisDK speclist_rus.am running
[ 36] Block 'Fire in the hol 0.1 Safety1st block_fire_in_t running
[ 37] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 38] Auto Demo Recorder 2.3 F@nt0M auto_demo_recor running
[ 39] Vip Modular 5.0.0-beta ArKaNeMaN VipModular.amxx running
[ 40] [VipM][M] Weapon Menu 5.0.0-beta ArKaNeMaN VipM-M-WeaponMe running
[ 41] [VipM-M] Vip in TAB 5.0.0-beta ArKaNeMaN VipM-M-VipInTab running
[ 42] [VipM][M] Vampire 5.0.0-beta ArKaNeMaN VipM-M-Vampire. running
[ 43] [VipM][M] Spawn Items 5.0.0-beta ArKaNeMaN VipM-M-SpawnIte running
[ 44] [VipM] Items Controlle 5.0.0-beta ArKaNeMaN VipM-ItemsContr running
[ 45] Connect Info 1.0 Hypa_[KZ] connect_info.am running
[ 46] Restrict Weapons 1.9.0.5294 AMXX Dev Team restmenu.amxx running
[ 47] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx.amxx running
[ 48] Custom Weapons API 0.7.5 ArKaNeMaN CustomWeaponsAP running
[ 49] [VipM-I] CWAPI 1.0.0 ArKaNeMaN VipM-I-Cwapi.am running
[ 50] Menu System 1.1 Hypa_[KZ] menu_system.amx running
[ 51] menupriv 1.0 PusToTa menupriv.amxx running
[ 52] [ReAPI] Healthnade 0.0.8f DEV-CS.RU Commun reapi_healthnad running
[ 53] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 54] Killa HP 1.6 jas0n killa_hp.amxx running
[ 55] [GM] Night VIP 1.1.1 [GM] NWC gm_night_vips.a running
[ 56] [Customizable] AmxModM 0.0.4 Albertio amxmodmenu.amxx running
[ 57] Autoresponder/Advertis 0.5 MaximusBrood reklama_in_chat running
[ 58] Aliases checker 1.0.6 kanagava alias_checker.a running
[ 59] Maps Menu 1.9.0.5235 AMXX Dev Team mapsmenu.amxx running
[ 60] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_info running
[ 61] Revive/Mined Die Playe 2.6.1 Emma Jule revive_teammate running
[ 62] Custom Smoke 1.07 bionext custom_smoke.am running
[ 63] Bomb HUD Timer 0.2 Twe3k c4_timer.amxx running
[ 64] COLORS MENU 1.2 DUKKHAZ0R color.amxx running
[ 65] Nice Killer 1.6 Got Milk? / HoHo nice_killer.amx running
[ 66] [VipM][I] Default 5.0.0-beta ArKaNeMaN VipM-I-Default. running
[ 67] [VipM-I] Limits 5.0.0-beta ArKaNeMaN VipM-I-Limits.a running
[ 68] [VipM][L] Default 5.0.0-beta ArKaNeMaN VipM-L-Default. running
[ 69] [VipM][L] Logic 5.0.0-beta ArKaNeMaN VipM-L-Logic.am running
[ 70] [VipM][L] Vip Test 1.0.0 ArKaNeMaN VipM-L-VipTest. running
[ 71] [VipM][M] Spawn Health 5.0.0-beta ArKaNeMaN VipM-M-SpawnHea running
[ 72] [VipM] Misc 5.0.0-beta ArKaNeMaN VipM-Misc.amxx running
[ 73] [VipM] Modules Limiter 5.0.0-beta ArKaNeMaN VipM-ModulesLim running
[ 74] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 75] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 76] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 77] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 78] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 79] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
- Автор плагина
- не знаю
- Версия плагина
- 2.6.1
- Исходный код
-
/*
Поддержать автора:
2200 0202 3238 8480 - мир
+79788752919 - киви
*/
#define PLUGIN "Revive/Mined Die Players"
#define VERSION "2.6.1"
//#define UNSTUCK // если у вас люди при воскрешении застряют люди в текстурах (и если у вас есть прохождения сквозь свових) то расскоментируйте это.
//#define SKIN // активируйте если у вас есть субмодели (skin) в моделях
new const CORPSE_CLASSNAME[] = "info_corpse";
stock const Float: DEFAULT_CORPSE_MINS[3] = { -24.0, -24.0, -24.0 };
stock const Float: DEFAULT_CORPSE_MAXS[3] = { 24.0, 24.0, 24.0 };
#define NOTIFY(%0,%1,%2,%3) \
%0(%1, %2, %3); \
\
if ((%2 == print_team_red || %2 == print_center) && g_eCvar[SOUND_NOTIFICATION]) \
client_cmd(%1, "spk ^"buttons/blip2.wav^"");
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <reapi>
enum _:CVARS
{
ACCESS[16],
MAX_SPAWNS,
MAX_REVIVALS,
MAX_MINES,
DURATION,
OBSERVER,
NO_FIRE,
RENDER[16],
BAR,
Float:RADIUS,
Float:DAMAGE,
Float:SHOCK,
SCREENPUNCH,
SPAWN_MODE,
#if REAPI_VERSION >= 520231
GIBS,
#endif
GUN[256],
Float:SPAWN_HEALTH,
Float:BONUS_HEALTH_FOR_REVIVE,
Float:BONUS_HEALTH_FOR_MINE,
FRAGS,
NO_DEATH,
COST,
RATIO,
BOMB,
VIP,
ROUND,
DOMINATION,
Float:TIME_EXPIRED,
Float:TIME_REMAINING,
SOUND_NOTIFICATION,
DONT_MOTION,
MINED_MODE,
NOTIFICATION,
REVIVE_SAMPLE[MAX_RESOURCE_PATH_LENGTH],
MINED_SAMPLE[MAX_RESOURCE_PATH_LENGTH],
EXPLODE_SAMPLE[MAX_RESOURCE_PATH_LENGTH],
SIZE[64]
};
// Дата на каждого игрока
enum _:REVIVE_DATA
{
CORPSE,
IS_REVIVING,
REVIVALS_COUNT,
MINES_COUNT
};
new g_iAccess, g_iPrevent;
new g_sModelIndexFireball, g_sModelIndexFireball2, g_sModelIndexFireball3;
new eCorpseStruct[MAX_PLAYERS + 1][REVIVE_DATA];
new Float:g_aRender[3];
new Float:g_vecCorpseMins[3], Float:g_vecCorpseMaxs[3];
new Float:flNextCorpseUsingTime[MAX_PLAYERS + 1];
new g_eCvar[CVARS];
public plugin_precache()
{
register_plugin(PLUGIN, VERSION, "Emma Jule");
@CreateCvars();
if (g_eCvar[REVIVE_SAMPLE][0])
precache_sound(g_eCvar[REVIVE_SAMPLE]);
if (g_eCvar[MINED_SAMPLE][0])
precache_sound(g_eCvar[MINED_SAMPLE]);
if (g_eCvar[EXPLODE_SAMPLE][0])
precache_sound(g_eCvar[EXPLODE_SAMPLE]);
// def sprites
g_sModelIndexFireball = precache_model("sprites/zerogxplode.spr");
g_sModelIndexFireball2 = precache_model("sprites/eexplo.spr");
g_sModelIndexFireball3 = precache_model("sprites/fexplo.spr");
}
public plugin_init()
{
register_dictionary("revive_teammates.txt");
register_event("TeamInfo", "Event_TeamInfo", "a", "1>0");
register_message(get_user_msgid("ClCorpse"), "@CorpseSpawn");
RegisterHookChain(RG_CSGameRules_CleanUpMap, "CSGameRules_CleanUpMap", true);
RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", true);
if (g_eCvar[DONT_MOTION])
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "CBasePlayer_ResetMaxSpeed", true);
RegisterHam(Ham_ObjectCaps, "info_target", "fw_ObjectCaps", false);
}
public OnConfigsExecuted()
{
new size[6][8], color[4][4];
if (parse(g_eCvar[SIZE], size[0], 7, size[1], 7, size[2], 7, size[3], 7, size[4], 7, size[5], 7) != sizeof(size))
{
@def:
g_vecCorpseMins = DEFAULT_CORPSE_MINS;
g_vecCorpseMaxs = DEFAULT_CORPSE_MAXS;
}
else
{
for (new i; i < 3; i++)
{
if ((g_vecCorpseMins[i] = str_to_float(size[i])) > 0.0 || (g_vecCorpseMaxs[i] = str_to_float(size[3 + i])) < 0.0)
{
goto @def
}
}
}
if (parse(g_eCvar[RENDER], color[0], 3, color[1], 3, color[2], 3) > 0)
{
for (new i; i < 3; i++)
{
g_aRender[i] = str_to_float(color[i]);
}
}
// Флаги доступа
g_iAccess = read_flags(g_eCvar[ACCESS]);
// Флаги движения
g_iPrevent |= (1 << 5);
if (g_eCvar[DONT_MOTION])
g_iPrevent |= (1 << 6);
}
public Event_TeamInfo()
{
@CorpseRemove(read_data(1));
}
public CSGameRules_CleanUpMap()
{
new id = rg_find_ent_by_class(NULLENT, CORPSE_CLASSNAME);
while (id > 0)
{
@CorpseRemove(get_entvar(id, var_owner));
id = rg_find_ent_by_class(id, CORPSE_CLASSNAME);
}
}
public CSGameRules_RestartRound()
{
arrayset(eCorpseStruct[0][_:0], 0, sizeof(eCorpseStruct) * sizeof(eCorpseStruct[]));
}
public CBasePlayer_ResetMaxSpeed(id)
{
if (eCorpseStruct[id][IS_REVIVING])
{
set_entvar(id, var_maxspeed, 1.0);
}
}
public fw_ObjectCaps(id)
{
if (!FClassnameIs(id, CORPSE_CLASSNAME))
return HAM_IGNORED;
SetHamReturnInteger(FCAP_ONOFF_USE);
return HAM_OVERRIDE;
}
public Corpse_Use(id, activator, caller, USE_TYPE:useType, Float:value)
{
if (value == 0.0)
return;
if (activator != caller)
return;
if (!ExecuteHam(Ham_IsPlayer, activator))
return;
// static Float:flCurTime;
new Float:time = get_gametime();
if (flNextCorpseUsingTime[activator] > time)
return;
flNextCorpseUsingTime[activator] = time + 0.65;
// if (~get_entvar(activator, var_flags) & FL_ONGROUND)
// return;
if (rg_get_current_round() < g_eCvar[ROUND])
{
NOTIFY(client_print_color, activator, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_ROUND", g_eCvar[ROUND])
return;
}
if (rg_is_time_expired(g_eCvar[TIME_EXPIRED]) == 0)
{
NOTIFY(client_print_color, activator, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_TIME_RESTRICTIONS", g_eCvar[TIME_EXPIRED])
return;
}
new TeamName:team = get_member(activator, m_iTeam);
if (g_eCvar[DOMINATION] > 0 && rg_get_team_wins_row(g_eCvar[DOMINATION]) == team)
{
NOTIFY(client_print_color, activator, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_DOMINATION")
return;
}
if (g_eCvar[VIP] && get_member(activator, m_bIsVIP))
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_VIP_PERSON")
return;
}
if ((caller = get_entvar(id, var_euser1)) > 0)
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_ALREADY_USING_BY", caller)
return;
}
if (UTIL_IsRestricted(id, activator))
return;
// Получаем владельца трупа
caller = get_entvar(id, var_owner);
// ВОСКРЕШЕНИЕ
if (team == get_entvar(id, var_team))
{
// 2.5.1
if (get_entvar(id, var_euser2) > 0 && g_eCvar[MINED_MODE] > 1 /* == 2 */ )
{
// set_entvar(id, var_euser1, activator + 32);
set_entvar(id, var_fuser1, time + random_float(0.5, 1.25));
set_entvar(id, var_nextthink, time + 0.1);
rh_emit_sound2(id, 0, CHAN_VOICE, "weapons/c4_click.wav");
return;
}
if (get_member(caller, m_iNumSpawns) > g_eCvar[MAX_SPAWNS])
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_MAX_SPAWNS")
return;
}
new rev = g_eCvar[MAX_REVIVALS];
if (get_user_flags(activator) & ADMIN_LEVEL_D)
rev += 1;
if (eCorpseStruct[activator][REVIVALS_COUNT] >= rev)
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_MAX_REVIVALS", rev)
return;
}
set_dhudmessage(0, 160, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(caller, "%L", LANG_PLAYER, "RT_REVIVED", activator);
set_dhudmessage(0, 160, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(activator, "%L", LANG_PLAYER, "RT_REVIVING", caller, g_eCvar[DURATION]);
if (g_eCvar[OBSERVER])
{
// set_entvar(caller, var_iuser2, OBS_IN_EYE);
rg_internal_cmd(caller, "specmode", "4");
set_entvar(caller, var_iuser2, activator);
set_member(caller, m_hObserverTarget, activator);
set_member(caller, m_flNextObserverInput, time + 1.25);
}
}
// МИНИРОВАНИЕ
else
{
if (!g_eCvar[MINED_MODE])
{
// NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_NO_MINED_MODE")
return;
}
if (get_entvar(id, var_euser2) > 0)
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_ALREADY_MINED")
return;
}
if (eCorpseStruct[activator][MINES_COUNT] >= g_eCvar[MAX_MINES])
{
NOTIFY(client_print, activator, print_center, "%L", LANG_PLAYER, "RT_MAX_MINES", g_eCvar[MAX_MINES])
return;
}
set_dhudmessage(160, 0, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(activator, "%L", LANG_PLAYER, "RT_MINING", caller);
}
// Присваеваем булевую которую можно проверять в других функциях
eCorpseStruct[activator][IS_REVIVING] = true;
// Ограничиваем движение игрока согласно флагам
set_entvar(activator, var_iuser3, get_entvar(activator, var_iuser3) | g_iPrevent);
if (g_eCvar[NO_FIRE])
set_member(activator, m_bIsDefusing, true);
if (g_eCvar[BAR])
rg_send_bartime(activator, g_eCvar[DURATION]);
if (g_eCvar[DONT_MOTION])
{
rg_reset_maxspeed(activator);
set_entvar(activator, var_velocity, NULL_VECTOR);
}
set_entvar(id, var_euser1, activator);
set_entvar(id, var_fuser1, time + float(g_eCvar[DURATION]));
set_entvar(id, var_nextthink, time + 0.1);
if (g_eCvar[RENDER][0])
rg_set_rendering(id, .fx = kRenderFxGlowShell, .color = g_aRender, .amount = 12.0);
}
public Corpse_Think(id)
{
// Get Activator
new pActivator = get_entvar(id, var_euser1);
if (pActivator > 0 && (!is_user_alive(pActivator) || ~get_entvar(pActivator, var_button) & IN_USE || UTIL_IsRestricted(id, pActivator)))
{
ResetRestrictions(id, !is_user_connected(pActivator) ? 0 : pActivator);
return;
}
new Float:flTimeLeft;
get_entvar(id, var_fuser1, flTimeLeft);
if ((flTimeLeft != 0.0 && get_gametime() >= flTimeLeft))
{
new Float:vecSrc[3];
get_entvar(id, var_origin, vecSrc);
// Fixes
if (pActivator > 0 && get_member(pActivator, m_iTeam) != get_entvar(id, var_team))
{
if (g_eCvar[MINED_SAMPLE][0])
{
rh_emit_sound2(id, 0, CHAN_BODY, g_eCvar[MINED_SAMPLE]);
}
NOTIFY(client_print_color, pActivator, print_team_blue, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_MINED_SUCCESS")
rg_add_health(pActivator, g_eCvar[BONUS_HEALTH_FOR_MINE], .obey_max = true);
rg_add_account(pActivator, -g_eCvar[COST]);
eCorpseStruct[pActivator][MINES_COUNT]++;
ResetRestrictions(id, pActivator);
// Set pMinedOwner
set_entvar(id, var_euser2, pActivator);
}
else
{
new pOwner = get_entvar(id, var_owner); // -- владелец трупа
new pMiner = get_entvar(id, var_euser2); // -- тот кто заминировал
new TeamName:iTeam = get_entvar(id, var_team);
if (pMiner > 0)
{
#if REAPI_VERSION >= 520231
if (g_eCvar[GIBS])
rg_spawn_random_gibs(id, 5);
#endif
// Make explode
UTIL_MakeExplosionEffects(vecSrc);
// Fixes
if (!is_user_connected(pMiner) || (1 << _:get_member(pMiner, m_iTeam) & ((1 << _:TEAM_UNASSIGNED) | (1 << _:TEAM_SPECTATOR) | (1 << _:iTeam))))
pMiner = 0;
for (new i = 1, Float:fDamage, Float:vecEnd[3]; i <= MaxClients; i++)
{
if (!is_user_alive(i))
continue;
if (get_member(i, m_iTeam) != iTeam)
continue;
get_entvar(i, var_origin, vecEnd);
if ((fDamage = (g_eCvar[DAMAGE] - vector_distance(vecSrc, vecEnd) * (g_eCvar[DAMAGE] / g_eCvar[RADIUS]))) < 1.0)
continue;
set_member(i, m_LastHitGroup, HITGROUP_GENERIC);
if (ExecuteHamB(Ham_TakeDamage, i, id, pMiner, fDamage, DMG_GRENADE | DMG_ALWAYSGIB))
{
set_member(i, m_flVelocityModifier, g_eCvar[SHOCK]);
if (g_eCvar[SCREENPUNCH])
set_entvar(i, var_punchangle, Float: { 42.2, 19.0, 64.4 });
}
}
@CorpseRemove(pOwner);
if (pActivator > 0)
NOTIFY(client_print_color, 0, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_WAS_MINED", pActivator)
}
else
{
// HACK: игнорирование GiveDefaultItems() при SpawnEquip
set_member(pOwner, m_bNotKilled, true);
// ScoreInfo
if (g_eCvar[NO_DEATH])
set_member(pOwner, m_iDeaths, max(get_member(pOwner, m_iDeaths) - 1, 0));
// create
rg_round_respawn(pOwner);
if (g_eCvar[SPAWN_MODE])
{
#if defined UNSTUCK
// UNDONE: SpawnSpot()
get_entvar(pActivator, var_origin, vecSrc);
#endif
engfunc(EngFunc_SetOrigin, pOwner, vecSrc);
set_entvar(pOwner, var_flags, get_entvar(pOwner, var_flags) | FL_DUCKING);
set_entvar(pOwner, var_view_ofs, Float:{ 0.0, 0.0, 12.0 });
}
if (g_eCvar[SPAWN_HEALTH])
{
set_entvar(pOwner, var_health, g_eCvar[SPAWN_HEALTH]);
set_entvar(pOwner, var_max_health, g_eCvar[SPAWN_HEALTH]);
}
if (g_eCvar[GUN][0])
rg_give_items(pOwner, g_eCvar[GUN]);
else
rg_give_default_items(pOwner);
if (g_eCvar[FRAGS])
ExecuteHamB(Ham_AddPoints, pActivator, g_eCvar[FRAGS], false);
rg_add_health(pActivator, g_eCvar[BONUS_HEALTH_FOR_REVIVE], .obey_max = true);
// aes_v.inc
// aes_add_player_exp_f(pActivator, 1);
// client_print_color(pActivator, print_team_default, "%L вы получили^4 1 XP", LANG_PLAYER, "RT_PREFIX");
if (g_eCvar[NOTIFICATION] < 2)
{
if (g_eCvar[NOTIFICATION])
{
// Всем
NOTIFY(client_print_color, 0, pActivator, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", pActivator, pOwner)
}
else
{
// Только игроку кто воскрешал и тому кого воскресили
NOTIFY(client_print_color, pOwner, pActivator, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", pActivator, pOwner)
NOTIFY(client_print_color, pActivator, print_team_default, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", pActivator, pOwner)
}
}
if (g_eCvar[REVIVE_SAMPLE][0])
{
rh_emit_sound2(id, 0, CHAN_BODY, g_eCvar[REVIVE_SAMPLE]);
}
rg_add_account(pActivator, -g_eCvar[COST]);
eCorpseStruct[pActivator][REVIVALS_COUNT]++;
}
}
}
set_entvar(id, var_nextthink, get_gametime() + 0.1);
}
ResetRestrictions(id = 0, pActivator)
{
if (pActivator > 0)
{
eCorpseStruct[pActivator][IS_REVIVING] = false;
set_entvar(pActivator, var_iuser3, get_entvar(pActivator, var_iuser3) & ~g_iPrevent);
if (g_eCvar[NO_FIRE])
set_member(pActivator, m_bIsDefusing, false);
if (g_eCvar[BAR])
rg_send_bartime(pActivator, 0);
rg_reset_maxspeed(pActivator);
}
if (id > 0)
{
set_entvar(id, var_euser1, 0);
set_entvar(id, var_fuser1, 0.0);
set_entvar(id, var_nextthink, 0.0);
rg_set_rendering(id);
}
}
UTIL_IsRestricted(pCorpse, pPlayer)
{
// Раунд окончен
if (get_member_game(m_bRoundTerminating))
{
return true;
}
/*
if (get_entvar(pCorpse, var_skin) == 6)
{
return true;
}
*/
// Нельзя использовать труп в повышенном движении
if (rg_get_speed(pPlayer) > 250.0)
{
return true;
}
// На лестнице
if (get_entvar(pPlayer, var_movetype) == MOVETYPE_FLY)
{
NOTIFY(client_print, pPlayer, print_center, "%L", LANG_PLAYER, "RT_ON_LADDER")
return true;
}
// По уши в воде
if (get_entvar(pPlayer, var_waterlevel) > 2)
{
NOTIFY(client_print, pPlayer, print_center, "%L", LANG_PLAYER, "RT_IN_WATER")
return true;
}
// Нет доступа
if ((get_user_flags(pPlayer) & g_iAccess) != g_iAccess)
{
NOTIFY(client_print_color, pPlayer, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_ACCESS")
return true;
}
// Время до конца раунда
if (1.0 <= rg_get_remaining_time() <= g_eCvar[TIME_REMAINING])
{
NOTIFY(client_print_color, pPlayer, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_REMAINING", g_eCvar[TIME_REMAINING])
return true;
}
// Бомба установленна
if (g_eCvar[BOMB] && rg_is_bomb_planted())
{
NOTIFY(client_print_color, pPlayer, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_BOMB")
return true;
}
// Остались 1 на 1
if (g_eCvar[RATIO] != -1 && rg_is_players_ratio())
{
NOTIFY(client_print_color, pPlayer, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_1V1")
return true;
}
// Нет денег
if (get_member(pPlayer, m_iAccount) < g_eCvar[COST])
{
NOTIFY(client_printex, pPlayer, print_center, "#Not_Enough_Money")
return true;
}
// check distance
static Float:vecCorpseOrigin[3], Float:vecPlayerOrigin[3];
get_entvar(pCorpse, var_origin, vecCorpseOrigin);
get_entvar(pPlayer, var_origin, vecPlayerOrigin);
if (vector_distance(vecCorpseOrigin, vecPlayerOrigin) > 128.0)
{
NOTIFY(client_print_color, pPlayer, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_DISTANCE")
return true;
}
return false;
}
// Создание трупа
@CorpseSpawn()
{
new id = rg_create_entity("info_target");
new Float:vecOrigin[3], Float:vecAngles[3];
for (new i; i < 3; i++)
{
vecOrigin[i] = float(get_msg_arg_int(2 + i)) / 128.0;
vecAngles[i] = get_msg_arg_float(5 + i);
}
new szModel[32];
new pPlayer = get_msg_arg_int(12);
get_msg_arg_string(1, szModel, charsmax(szModel));
set_entvar(id, var_classname, CORPSE_CLASSNAME);
set_entvar(id, var_solid, SOLID_TRIGGER);
set_entvar(id, var_angles, vecAngles);
set_entvar(id, var_body, get_msg_arg_int(10));
#if defined SKIN
set_entvar(id, var_skin, get_entvar(pPlayer, var_skin));
#endif
set_entvar(id, var_framerate, 1.0);
set_entvar(id, var_animtime, 0.0);
set_entvar(id, var_sequence, get_msg_arg_int(9));
set_entvar(id, var_owner, pPlayer);
set_entvar(id, var_team, get_msg_arg_int(11));
// Not edit this, custom fields
set_entvar(id, var_fuser1, 0.0); // pData Timer
// set_entvar(id, var_fuser2, get_gametime()); // pData Created
set_entvar(id, var_euser1, 0); // pData Activator
set_entvar(id, var_euser2, 0); // pData Mined
engfunc(EngFunc_SetModel, id, fmt("models/player/%s/%s.mdl", szModel, szModel));
engfunc(EngFunc_SetSize, id, g_vecCorpseMins, g_vecCorpseMaxs);
engfunc(EngFunc_SetOrigin, id, vecOrigin);
SetUse(id, "Corpse_Use");
SetThink(id, "Corpse_Think");
eCorpseStruct[pPlayer][CORPSE] = id;
// hook original corpse
return PLUGIN_HANDLED;
}
// Удаление трупа
@CorpseRemove(pOwner)
{
new id = eCorpseStruct[pOwner][CORPSE];
eCorpseStruct[pOwner][CORPSE] = 0;
if (is_nullent(id))
return;
ResetRestrictions(.pActivator = get_entvar(id, var_euser1));
SetUse(id, NULL_STRING);
SetThink(id, NULL_STRING);
set_entvar(id, var_flags, FL_KILLME);
set_entvar(id, var_nextthink, -1.0);
}
// Регистрация кваров
@CreateCvars()
{
bind_pcvar_string(create_cvar("rt_access", "", .description = "Флаг(и) доступа для воскрешений/минирований игроков"), g_eCvar[ACCESS], charsmax(g_eCvar[ACCESS]));
bind_pcvar_num(create_cvar("rt_max_spawns", "2", .description = "Сколько максимально может воскреснуть игрок за раунд", .has_max = true, .max_val = 10.0), g_eCvar[MAX_SPAWNS]);
bind_pcvar_num(create_cvar("rt_max_revivals", "2", .description = "Сколько максимально может воскресить союзников игрок за раунд"), g_eCvar[MAX_REVIVALS]);
bind_pcvar_num(create_cvar("rt_max_mines", "2", .description = "Сколько максимально может заминировать врагов игрок за раунд"), g_eCvar[MAX_MINES]);
bind_pcvar_num(create_cvar("rt_duration", "0", .description = "Длительность возрождения", .has_min = true, .min_val = 1.0, .has_max = true, .max_val = 30.0), g_eCvar[DURATION]);
bind_pcvar_num(create_cvar("rt_observer", "1", .description = "Автоматически переключать мою камеру на того кто меня воскрешает"), g_eCvar[OBSERVER]);
bind_pcvar_num(create_cvar("rt_hook_attack", "1", .description = "Заблокировать стрельбу во время возрождения/минирования?"), g_eCvar[NO_FIRE]);
bind_pcvar_string(create_cvar("rt_render", "50 50 50", .description = "Подсвечивать труп когда его минируют/возрождают?^nФормат: R (red) G (green) B (blue)"), g_eCvar[RENDER], charsmax(g_eCvar[RENDER]));
bind_pcvar_num(create_cvar("rt_progress_bar", "1", .description = "Полоска прогресса во время возрождения/минирования?"), g_eCvar[BAR]);
bind_pcvar_float(create_cvar("rt_radius", "350.0", .description = "Максимальный допустимый радиус поражения", .has_min = true, .min_val = 64.0, .has_max = true, .max_val = 500.0), g_eCvar[RADIUS]);
bind_pcvar_float(create_cvar("rt_damage", "250.0", .description = "Максимальный урон от взрыва (урон наносится в зависимости от радиуса)", .has_min = true, .min_val = 64.0), g_eCvar[DAMAGE]);
bind_pcvar_float(create_cvar("rt_painshock", "0.15", .description = "Болевой шок после удара (сила замедления диапазон: от 0 до 1)", .has_min = true, .has_max = true, .max_val = 1.0), g_eCvar[SHOCK]);
bind_pcvar_num(create_cvar("rt_screen_punch", "1", .description = "Трясти экран от полученного урона (взрывной волны)"), g_eCvar[SCREENPUNCH]);
bind_pcvar_num(create_cvar("rt_spawn_place", "1", .description = "Спавнить воскрешенного игрока на месте смерти (в противном случае будет на базе)"), g_eCvar[SPAWN_MODE]);
#if REAPI_VERSION >= 520231
bind_pcvar_num(create_cvar("rt_gibs", "0", .description = "Спавнить ошметки после взрыва заминированного трупа?"), g_eCvar[GIBS]);
#endif
bind_pcvar_string(create_cvar("rt_weapons", "knife deagle", .description = "Оружия вновь воскрешенного игрока (пустое значение будет использовать оружия из game.cfg)"), g_eCvar[GUN], charsmax(g_eCvar[GUN]));
bind_pcvar_float(create_cvar("rt_health", "0.0", .description = "Здоровье воскрешенного игрока (0 - будет как обычно)", .has_max = true, .max_val = 255.0), g_eCvar[SPAWN_HEALTH]);
bind_pcvar_float(create_cvar("rt_health_for_revive", "0.0", .description = "Сколько добавить здоровья игроку за воскрешение", .has_max = true, .max_val = 100.0), g_eCvar[BONUS_HEALTH_FOR_REVIVE]);
bind_pcvar_float(create_cvar("rt_health_for_mine", "0.0", .description = "Сколько добавить здоровья игроку за минирование", .has_max = true, .max_val = 100.0), g_eCvar[BONUS_HEALTH_FOR_MINE]);
bind_pcvar_num(create_cvar("rt_frags", "0", .description = "Сколько давать фрагов за возрождение?"), g_eCvar[FRAGS]);
bind_pcvar_num(create_cvar("rt_restore_death", "0", .description = "Обнулить очко смерти игроку которое он получил при смерти"), g_eCvar[NO_DEATH]);
bind_pcvar_num(create_cvar("rt_cost", "0", .description = "Стоимость услуги (используйте отрицательное значение и тогда будет в + как награда)"), g_eCvar[COST]);
bind_pcvar_num(create_cvar("rt_bomb", "0", .description = "Нельзя воскрешать когда бомба установленна"), g_eCvar[BOMB]);
bind_pcvar_num(create_cvar("rt_ratio", "-1", .description = "0 - нельзя когда 1 vs 1^n1 - когда остался 1 игрок в одной из команд^n2 и выше - разница живых игроков^n-1 - отключено!", .has_min = true, .min_val = -1.0), g_eCvar[RATIO]);
bind_pcvar_num(create_cvar("rt_vip", "0", .description = "Может ли VIP игрок воскрешать (as_* карты)"), g_eCvar[VIP]);
bind_pcvar_num(create_cvar("rt_round", "0", .description = "С какого раунда доступно возрождение"), g_eCvar[ROUND]);
bind_pcvar_num(create_cvar("rt_domination", "0", .description = "Если команда доминирует над другой (побед подряд) запретить ей воскрешать/минировать?"), g_eCvar[DOMINATION]);
bind_pcvar_float(create_cvar("rt_time_expired", "0.0", .description = "Возможность воскрешать/минировать только после Х сек. от начала раунда", .has_max = true, .max_val = 60.0), g_eCvar[TIME_EXPIRED]);
bind_pcvar_float(create_cvar("rt_time_remaining", "0.0", .description = "Запрет воскрешения/минирования за Х сек. от конца раунда", .has_max = true, .max_val = 120.0), g_eCvar[TIME_REMAINING]);
bind_pcvar_num(create_cvar("rt_sound_notification", "1", .description = "Проигрывать звук к запрещаюшим уведомлениям"), g_eCvar[SOUND_NOTIFICATION]);
bind_pcvar_num(create_cvar("rt_dont_motion", "1", .description = "Заблокировать движение во время воскрешения/минирования"), g_eCvar[DONT_MOTION]);
bind_pcvar_num(create_cvar("rt_mined_mode", "1", .description = "Режим минирования^n0 - откл. только воскрешение^n1 - можно минировать^n2 - можно минировать (детонация через ~ секунду)"), g_eCvar[MINED_MODE]);
bind_pcvar_num(create_cvar("rt_notification", "1", .description = "Метод уведомлений при воскрешении^n2 - отключить^n1 - всем^n0 - только тому кто поднимал и тому кто поднял", .has_min = true), g_eCvar[NOTIFICATION]);
bind_pcvar_string(create_cvar("rt_revive_sample", "", .description = "Звук воскрешения трупа (опционально)"), g_eCvar[REVIVE_SAMPLE], charsmax(g_eCvar[REVIVE_SAMPLE]));
bind_pcvar_string(create_cvar("rt_mined_sample", "weapons/c4_disarm.wav", .description = "Звук когда труп заминировали (опционально)"), g_eCvar[MINED_SAMPLE], charsmax(g_eCvar[MINED_SAMPLE]));
bind_pcvar_string(create_cvar("rt_explode_sample", "", .description = "Звук взрыва от заминированного трупа (опционально)"), g_eCvar[EXPLODE_SAMPLE], charsmax(g_eCvar[EXPLODE_SAMPLE]));
bind_pcvar_string(create_cvar("rt_size", "-24.0 -24.0 -24.0 24.0 24.0 24.0", .description = "Минимальный и максимальный размер объекта"), g_eCvar[SIZE], charsmax(g_eCvar[SIZE]));
// configs/plugins/revive_teammates.cfg
AutoExecConfig(.name = "revive_teammates");
}
// Взрыв
stock UTIL_MakeExplosionEffects(const Float:vecOrigin[3])
{
new flag = TE_EXPLFLAG_NONE;
if (g_eCvar[EXPLODE_SAMPLE][0])
flag = TE_EXPLFLAG_NOSOUND;
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_EXPLOSION); // This makes a dynamic light and the explosion sprites/sound
write_coord_f(vecOrigin[0]); // Send to PAS because of the sound
write_coord_f(vecOrigin[1]);
write_coord_f(vecOrigin[2] + 20.0);
write_short(g_sModelIndexFireball3);
write_byte(25); // scale * 10
write_byte(30); // framerate
write_byte(flag); // flags
message_end();
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_EXPLOSION); // This makes a dynamic light and the explosion sprites/sound
write_coord_f(vecOrigin[0] + random_float(-64.0, 64.0)); // Send to PAS because of the sound
write_coord_f(vecOrigin[1] + random_float(-64.0, 64.0));
write_coord_f(vecOrigin[2] + random_float(30.0, 35.0));
write_short(g_sModelIndexFireball2);
write_byte(30); // scale * 10
write_byte(30); // framerate
write_byte(flag); // flags
message_end();
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_SPRITE);
write_coord_f(vecOrigin[0] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[1] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[2] + random_float(-10.0, 10.0));
write_short(g_sModelIndexFireball2);
write_byte(30);
write_byte(150);
message_end();
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_SPRITE);
write_coord_f(vecOrigin[0] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[1] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[2] + random_float(-10.0, 10.0));
write_short(g_sModelIndexFireball2);
write_byte(30);
write_byte(150);
message_end();
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_SPRITE);
write_coord_f(vecOrigin[0] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[1] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[2] + random_float(-10.0, 10.0));
write_short(g_sModelIndexFireball3);
write_byte(30);
write_byte(150);
message_end();
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecOrigin);
write_byte(TE_SPRITE);
write_coord_f(vecOrigin[0] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[1] + random_float(-256.0, 256.0));
write_coord_f(vecOrigin[2] + random_float(-10.0, 10.0));
write_short(g_sModelIndexFireball);
write_byte(30);
write_byte(17);
message_end();
if (flag == TE_EXPLFLAG_NOSOUND)
{
// xs_vec_mul_scalar(vecOrigin, 2.0, vecOrigin);
rh_emit_sound2(0, 0, CHAN_AUTO, g_eCvar[EXPLODE_SAMPLE], .origin = vecOrigin);
}
}
stock rg_is_players_ratio()
{
new alive_t, alive_ct;
rg_initialize_player_counts(alive_t, alive_ct, _, _);
switch (g_eCvar[RATIO])
{
case 0:
return (alive_t == 1 && alive_ct == 1);
case 1:
return (alive_t == 1 || alive_ct == 1);
default:
return !(abs(alive_t - alive_ct) < g_eCvar[RATIO]);
}
return false;
}
stock Float:rg_get_speed(const id)
{
new Float:vecVelocity[3];
get_entvar(id, var_velocity, vecVelocity);
return vector_length(vecVelocity);
}
stock rg_set_rendering(const id, const fx = kRenderFxNone, const mode = kRenderNormal, const Float:color[3] = NULL_VECTOR, const Float:amount = 0.0)
{
set_entvar(id, var_renderfx, fx);
set_entvar(id, var_rendermode, mode);
set_entvar(id, var_rendercolor, color);
set_entvar(id, var_renderamt, amount);
}
stock rg_get_current_round()
{
return (get_member_game(m_iTotalRoundsPlayed) + 1);
}
stock rg_is_time_expired(Float:sec)
{
if (get_member_game(m_bRoundTerminating))
return -1;
return (get_gametime() - Float: get_member_game(m_fRoundStartTime) > sec);
}
stock Float:rg_get_remaining_time()
{
return (float(get_member_game(m_iRoundTimeSecs)) - get_gametime() + Float: get_member_game(m_fRoundStartTimeReal));
}
stock rg_give_items(const id, reference[])
{
new weapon[11];
new size = strlen(reference) - 1;
while (argbreak(reference, weapon, charsmax(weapon), reference, size) != -1)
{
rg_give_item(id, fmt("weapon_%s", weapon));
}
}
stock TeamName:rg_get_team_wins_row(const wins)
{
new TeamName:team = TEAM_UNASSIGNED;
new iNumConsecutiveCTLoses = get_member_game(m_iNumConsecutiveCTLoses);
new iNumConsecutiveTerroristLoses = get_member_game(m_iNumConsecutiveTerroristLoses);
if (iNumConsecutiveCTLoses > 0)
team = TEAM_TERRORIST;
else if (iNumConsecutiveTerroristLoses > 0)
team = TEAM_CT;
if (iNumConsecutiveCTLoses + iNumConsecutiveTerroristLoses < wins)
team = TEAM_UNASSIGNED;
return team;
}
stock rg_add_health(const id, const Float:health, bool:obey_max = true)
{
if (obey_max)
set_entvar(id, var_health, floatclamp(Float:get_entvar(id, var_health) + health, 1.0, Float:get_entvar(id, var_max_health)));
else
set_entvar(id, var_health, floatmax(Float:get_entvar(id, var_health) + health, 1.0));
НУЖНО чтобы в чате стоял префикс для игроков северный [АДАПТАЦИЯ] nik ПОДНЯЛ БРАТИШКУ nik
А для премиума по флагу [ПРЕМИУМ] nik ПОДНЯЛ БРАТИШКУ nik
Чтобы игроки обычные могли поднимать 1 раз а премиум 2 раза по флагу
А для премиума по флагу [ПРЕМИУМ] nik ПОДНЯЛ БРАТИШКУ nik
Чтобы игроки обычные могли поднимать 1 раз а премиум 2 раза по флагу
Download all Attachments
-
32 KB Просмотры: 81
-
2 KB Просмотры: 87