Пользователь
- Сообщения
- 13
- Реакции
- -1
- Ошибка
-
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(55) : error 017: undefined symbol "MAX_RESOURCE_PATH_LENGTH"
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(68) : error 017: undefined symbol "MAX_PLAYERS"
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(113) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : error 017: undefined symbol "client_print_color"
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : warning 215: expression has no effect
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : warning 215: expression has no effect
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : warning 215: expression has no effect
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : warning 215: expression has no effect
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : warning 215: expression has no effect
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : error 001: expected token: ";", but found ")"
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : error 029: invalid expression, assumed zero
// C:\Users\vodo4ka\Desktop\compiler_amxmodx_1.9.0\revive_teammates.sma(161) : fatal error 107: too many error messages on one line
- Компилятор
- Локальный
- Amx Mod X
- 1.9.0
- Исходный код
-
//#define UNSTUCK // если у вас люди при воскрешении застряют люди в текстурах (и если у вас есть прохождения сквозь свових) то расскоментируйте это.
//#define SKIN // активируйте если у вас есть субмодели (skin) в моделях
//new const REVIVE_SAMPLE[] = "warcraft3/reincarnation.wav";
//new const MINED_SAMPLE[] = "weapons/c4_disarm.wav";
//new const MINED_EXPLOSION_SAMPLE[] = "weapons/rocketfire1.wav";
new const CORPSE_CLASSNAME[] = "info_corpse";
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <reapi>
#if !defined PLAYER_PREVENT_CLIMB
#define PLAYER_PREVENT_CLIMB (1<<5) // The player can't climb ladder
#endif
enum _:CVARS
{
//Float:TIME_RULES,
ACCESS[16],
MAX_SPAWNS,
MAX_REVIVALS,
MAX_MINES,
DURATION,
OBSERVER,
NO_FIRE,
RENDER,
BAR,
Float:RADIUS,
Float:DAMAGE,
SCREENPUNCH,
SPAWN_MODE,
#if REAPI_VERSION >= 5200231
GIBS,
#endif
GUN[256],
Float:NEW_HEALTH,
Float:BONUS_HEALTH,
FRAGS,
NO_DEATH,
COST,
NOTIFICATION,
TOUCH_NOTIFICATION,
REVIVE_SAMPLE[MAX_RESOURCE_PATH_LENGTH],
MINED_SAMPLE[MAX_RESOURCE_PATH_LENGTH],
}; new CVAR[CVARS];
enum _:REVIVE_DATA
{
CORPSE,
IS_REVIVING,
REVIVALS_COUNT,
MINES_COUNT,
}; new eCorpseStruct[MAX_PLAYERS + 1][REVIVE_DATA];
new g_sModelIndexFireball2, g_iAccessFlag;
public plugin_precache()
{
register_plugin("Revive Die Players", "2.2.5", "Emma Jule");
@CreateCvars();
g_sModelIndexFireball2 = precache_model("sprites/fexplo.spr");
}
public plugin_init()
{
if (register_dictionary("revive_teammates.txt") == 0) {
//createLangFile("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_CBasePlayer_ResetMaxSpeed, "CBasePlayer_ResetMaxSpeed", true);
}
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);
}
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 Corpse_Touch(id, other)
{
//if (is_nullent(id))
//return;
if (!ExecuteHam(Ham_IsPlayer, other))
return;
//if (get_entvar(other, var_deadflag) != DEAD_NO)
//return;
new pOwner = get_entvar(id, var_owner);
new pActivator = get_entvar(id, var_euser1);
new pMinedOwner = get_entvar(id, var_euser2);
new bUse = (get_entvar(other, var_button) & IN_USE);
new bSameTeam = (get_member(other, m_iTeam) == get_member(pOwner, m_iTeam));
static Float:flCurTime;
flCurTime = get_gametime();
if (other == pActivator)
{
if (!bUse) // think checks
{
ResetRestrictions(id, other);
}
else
{
new Float:flTimeLeft;
get_entvar(id, var_fuser1, flTimeLeft);
if ((flTimeLeft != 0.0 && flCurTime >= flTimeLeft))
{
new Float:vecSrc[3];
get_entvar(id, var_origin, vecSrc);
if (!bSameTeam)
{
client_print_color(other, print_team_blue, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_MINED_SUCCESS");
if (CVAR[MINED_SAMPLE][0]) {
rh_emit_sound2(id, 0, CHAN_BODY, CVAR[MINED_SAMPLE]);
}
eCorpseStruct[other][MINES_COUNT]++;
ResetRestrictions(id, other);
{
// Set pMinedOwner
set_entvar(id, var_euser2, other);
}
}
else
{
new TeamName:iTeam = get_entvar(id, var_team);
if (pMinedOwner > 0)
{
new Float:vecSrc[3];
get_entvar(id, var_origin, vecSrc);
#if REAPI_VERSION >= 5200231
if (CVAR[GIBS])
rg_spawn_random_gibs(id, 5);
#endif
message_begin_f(MSG_PAS, SVC_TEMPENTITY, vecSrc);
write_byte(TE_EXPLOSION); // This makes a dynamic light and the explosion sprites/sound
write_coord_f(vecSrc[0] + random_float(-256.0, 256.0)); // Send to PAS because of the sound
write_coord_f(vecSrc[1] + random_float(-256.0, 256.0));
write_coord_f(vecSrc[2] + random_float(30.0, 90.0));
write_short(g_sModelIndexFireball2);
write_byte(30); // scale * 10
write_byte(120); // framerate
write_byte(TE_EXPLFLAG_NONE); // flags
message_end();
// fixes
if (!is_user_connected(pMinedOwner) || !(TEAM_UNASSIGNED < get_member(pMinedOwner, m_iTeam) < TEAM_SPECTATOR) || get_member(pMinedOwner, m_iTeam) == iTeam) {
pMinedOwner = 0;
}
for (new i = 1, Float:fReduceDamage, 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 ((fReduceDamage = (CVAR[DAMAGE] - vector_distance(vecSrc, vecEnd) * (CVAR[DAMAGE] / CVAR[RADIUS]))) < 1.0)
continue;
set_member(i, m_LastHitGroup, HITGROUP_GENERIC);
if (ExecuteHamB(Ham_TakeDamage, i, id, pMinedOwner, fReduceDamage, DMG_ALWAYSGIB) && CVAR[SCREENPUNCH])
{
// screen punch
set_entvar(i, var_punchangle, Float: { 15.0, 20.0, 10.0 });
}
}
client_print_color(other, print_team_red, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_WAS_MINED");
//if (CVAR[MINED_EXPLOSION_SAMPLE][0]) {
//rh_emit_sound2(id, 0, CHAN_ITEM, CVAR[MINED_EXPLOSION_SAMPLE]);
//}
@CorpseRemove(pOwner);
}
else
{
// ::GiveDefaultItems()
set_member(pOwner, m_bNotKilled, true);
// no ScoreInfo
if (CVAR[NO_DEATH])
set_member(pOwner, m_iDeaths, get_member(pOwner, m_iDeaths) - 1);
rg_round_respawn(pOwner);
if (CVAR[SPAWN_MODE])
{
#if defined UNSTUCK
get_entvar(other, var_origin, vecSrc);
engfunc(EngFunc_SetOrigin, pOwner, vecSrc);
#else
engfunc(EngFunc_SetOrigin, pOwner, vecSrc);
#endif
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 (CVAR[NEW_HEALTH])
{
set_entvar(pOwner, var_health, CVAR[NEW_HEALTH]);
set_entvar(pOwner, var_max_health, CVAR[NEW_HEALTH]);
}
if (CVAR[GUN][0])
{
// rg_give_item(pOwner, "weapon_knife");
new szWeapon[17];
while ((argbreak(CVAR[GUN], szWeapon, charsmax(szWeapon), CVAR[GUN], charsmax(CVAR[GUN]))) != -1) {
rg_give_item(pOwner, fmt("weapon_%s", szWeapon));
}
}
else
rg_give_default_items(pOwner);
if (CVAR[FRAGS])
ExecuteHamB(Ham_AddPoints, other, CVAR[FRAGS], true);
if (CVAR[BONUS_HEALTH])
ExecuteHamB(Ham_TakeHealth, other, CVAR[BONUS_HEALTH], DMG_GENERIC);
// todo flags
if (CVAR[NOTIFICATION] < 3)
{
if (CVAR[NOTIFICATION] == 2)
{
client_print_color(pOwner, other, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", other, pOwner);
client_print_color(other, print_team_default, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", other, pOwner);
}
else
{
for (new i = 1; i <= MaxClients; i++)
{
if (!is_user_connected(i)) {
continue;
}
if (CVAR[NOTIFICATION] && get_member(i, m_iTeam) != iTeam) {
continue;
}
client_print_color(i, other, "%L %L", LANG_PLAYER, "RT_PREFIX", LANG_PLAYER, "RT_NOTIFICATION", other, pOwner);
}
}
}
if (CVAR[REVIVE_SAMPLE][0])
rh_emit_sound2(id, 0, CHAN_BODY, CVAR[REVIVE_SAMPLE]);
rg_add_account(other, -CVAR[COST]);
eCorpseStruct[other][REVIVALS_COUNT]++;
}
}
}
}
}
else
{
if (get_member_game(m_bRoundTerminating)) {
return;
}
// it's killed
//if (get_entvar(id, var_rendermode) == kRenderTransAlpha) {
//return;
//}
// ~ONGROUND
if (Float: get_member(other, m_flFallVelocity) > CS_PLAYER_FALL_PUNCH_THRESHHOLD) {
return;
}
if (g_iAccessFlag && ~get_user_flags(other) & g_iAccessFlag) {
return;
}
new Float:vecVelocity[3];
get_entvar(other, var_velocity, vecVelocity);
if (vector_length(vecVelocity) > 240.0) {
return;
}
if (bUse)
{
if (get_entvar(other, var_movetype) == MOVETYPE_FLY)
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_ON_LADDER");
return;
}
if (get_entvar(other, var_waterlevel) > 2)
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_IN_WATER");
return;
}
if (get_member(pOwner, m_iNumSpawns) > CVAR[MAX_SPAWNS])
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_MAX_SPAWNS");
return;
}
if (pActivator)
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_ALREADY_USING_BY", pActivator);
return;
}
if (bSameTeam)
{
if (eCorpseStruct[other][REVIVALS_COUNT] >= CVAR[MAX_REVIVALS])
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_MAX_REVIVALS", CVAR[MAX_REVIVALS]);
return;
}
set_dhudmessage(0, 160, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(pOwner, "%L", LANG_PLAYER, "RT_REVIVED", other);
set_dhudmessage(0, 160, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(other, "%L", LANG_PLAYER, "RT_REVIVING", pOwner, CVAR[DURATION]);
if (CVAR[OBSERVER])
{
// set_entvar(pOwner, var_euser2, OBS_IN_EYE);
rg_internal_cmd(pOwner, "specmode", "4");
set_entvar(pOwner, var_iuser2, other);
set_member(pOwner, m_hObserverTarget, other);
set_member(pOwner, m_flNextObserverInput, flCurTime + 1.6);
}
}
else
{
if (pMinedOwner > 0)
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_ALREADY_MINED");
return;
}
if (eCorpseStruct[other][MINES_COUNT] >= CVAR[MAX_MINES])
{
client_print(other, print_center, "%L", LANG_PLAYER, "RT_MAX_MINES", CVAR[MAX_MINES]);
return;
}
set_dhudmessage(0, 160, 30, -1.0, 0.76, 2, 3.0, 2.0, 0.03, 0.4);
show_dhudmessage(other, "%L", LANG_PLAYER, "RT_MINING", pOwner);
}
eCorpseStruct[other][IS_REVIVING] = true;
set_entvar(other, var_iuser3, get_entvar(other, var_iuser3) | PLAYER_PREVENT_CLIMB);
if (CVAR[NO_FIRE])
set_member(other, m_bIsDefusing, true);
if (CVAR[BAR])
rg_send_bartime(other, CVAR[DURATION]);
rg_reset_maxspeed(other);
set_entvar(id, var_euser1, other);
set_entvar(id, var_fuser1, flCurTime + float(CVAR[DURATION]));
set_entvar(id, var_nextthink, flCurTime + 0.1);
if (CVAR[RENDER])
{
UTIL_Render(id,
.mode = kRenderTransAlpha,
.flColor = Float:{ 200.0, 200.0, 200.0 },
.fAmount = 200.0
);
}
set_entvar(other, var_velocity, NULL_VECTOR);
}
else if (CVAR[TOUCH_NOTIFICATION])
{
if (bSameTeam) {
if (eCorpseStruct[other][REVIVALS_COUNT] < CVAR[MAX_REVIVALS])
client_print(other, print_center, "%L", LANG_PLAYER, "RT_REVIVE_NOTIFY_MESSAGE", pOwner);
}
else if (!pMinedOwner && eCorpseStruct[other][MINES_COUNT] < CVAR[MAX_MINES])
client_print(other, print_center, "%L", LANG_PLAYER, "RT_MINED_NOTIFY_MESSAGE", pOwner);
}
}
}
public Corpse_Think(id)
{
//if (is_nullent(id))
//return;
new pActivator = get_entvar(id, var_euser1);
// fixes
if (pActivator > 0)
{
if (!is_user_alive(pActivator) /*get_entvar(pActivator, var_deadflag) != DEAD_NO*/ || get_member_game(m_bRoundTerminating))
{
ResetRestrictions(id, !is_user_connected(pActivator) ? 0 : pActivator);
}
else
{
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) & ~PLAYER_PREVENT_CLIMB);
if (CVAR[NO_FIRE])
set_member(pActivator, m_bIsDefusing, false);
if (CVAR[BAR]) {
// 3rd party
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);
if (CVAR[RENDER])
UTIL_Render(id);
}
}
@CorpseSpawn()
{
new id
= rg_create_entity("info_target");
if (is_nullent(id))
return PLUGIN_HANDLED;
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_movetype, MOVETYPE_TOSS);
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_euser1, 0); // pData activator
set_entvar(id, var_fuser1, 0.0); // pData timing
set_entvar(id, var_euser2, 0); // pData mined
set_entvar(id, var_owner, pPlayer);
set_entvar(id, var_team, get_msg_arg_int(11));
engfunc(EngFunc_SetModel, id, fmt("models/player/%s/%s.mdl", szModel, szModel));
engfunc(EngFunc_SetSize, id, Float:{ -24.0, -24.0, -24.0 }, Float:{ 24.0, 24.0, 24.0 });
engfunc(EngFunc_SetOrigin, id, vecOrigin);
// корень
SetTouch(id, "Corpse_Touch");
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));
SetTouch(id, "");
SetThink(id, "");
set_entvar(id, var_flags, FL_KILLME);
set_entvar(id, var_nextthink, get_gametime());
}
@CreateCvars()
{
//bind_pcvar_float(create_cvar("rt_time_rules", "15.0", .description = "Запрет воскрешений за Х сек. от начала раунда", .has_max = true, .max_val = 60.0), CVAR[TIME_RULES]);
bind_pcvar_string(create_cvar("rt_access", "", .description = "Флаг(и) доступа для воскрешений/минирований игроков"), CVAR[ACCESS], charsmax(CVAR[ACCESS]));
bind_pcvar_num(create_cvar("rt_max_spawns", "3", .description = "Сколько максимально может воскреснуть игрок за раунд", .has_max = true, .max_val = 10.0), CVAR[MAX_SPAWNS]);
bind_pcvar_num(create_cvar("rt_max_revivals", "2", .description = "Сколько максимально может воскресить союзников игрок за раунд"), CVAR[MAX_REVIVALS]);
bind_pcvar_num(create_cvar("rt_max_mines", "2", .description = "Сколько максимально может заминировать врагов игрок за раунд"), CVAR[MAX_MINES]);
bind_pcvar_num(create_cvar("rt_duration", "5", .description = "Длительность возрождения", .has_min = true, .min_val = 1.0, .has_max = true, .max_val = 30.0), CVAR[DURATION]);
bind_pcvar_num(create_cvar("rt_observer", "1", .description = "Автоматически переключать камеру на того кто воскрешает труп"), CVAR[OBSERVER]);
bind_pcvar_num(create_cvar("rt_hook_attack", "1", .description = "Заблокировать стрельбу во время возрождения/минирования?"), CVAR[NO_FIRE]);
bind_pcvar_num(create_cvar("rt_render", "1", .description = "Подсвечивать труп когда его минируют/возрождают?"), CVAR[RENDER]);
bind_pcvar_num(create_cvar("rt_progress_bar", "1", .description = "Полоска прогресса во время возрождения/минирования?"), CVAR[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), CVAR[RADIUS]);
bind_pcvar_float(create_cvar("rt_damage", "250.0", .description = "Максимальный урон от взрыва (урон наносится в зависимости от радиуса)", .has_min = true, .min_val = 64.0), CVAR[DAMAGE]);
bind_pcvar_num(create_cvar("rt_screen_punch", "1", .description = "Трясти экран от полученного урона (взрывной волны)"), CVAR[SCREENPUNCH]);
bind_pcvar_num(create_cvar("rt_spawn_place", "1", .description = "Спавнить воскрешенного игрока на месте смерти (в противном случае будет на базе)"), CVAR[SPAWN_MODE]);
#if REAPI_VERSION >= 5200231
bind_pcvar_num(create_cvar("rt_gibs", "1", .description = "Спавнить ошметки после взрыва заминированного трупа?"), CVAR[GIBS]);
#endif
bind_pcvar_string(create_cvar("rt_weapons", "knife deagle", .description = "Оружия вновь воскрешенного игрока (пустое значение будет использовать оружия из game.cfg)"), CVAR[GUN], charsmax(CVAR[GUN]));
bind_pcvar_float(create_cvar("rt_health", "0.0", .description = "Здоровье воскрешенного игрока (0 - будет как обычно)", .has_max = true, .max_val = 255.0), CVAR[NEW_HEALTH]);
bind_pcvar_float(create_cvar("rt_bonus_health", "10.0", .description = "Сколько добавить здоровья игроку за воскрешение", .has_max = true, .max_val = 100.0), CVAR[BONUS_HEALTH]);
bind_pcvar_num(create_cvar("rt_frags", "1", .description = "Сколько давать фрагов за возрождение?"), CVAR[FRAGS]);
bind_pcvar_num(create_cvar("rt_restore_death", "1", .description = "Обнулить очко смертей игроку которое он получил при смерти"), CVAR[NO_DEATH]);
bind_pcvar_num(create_cvar("rt_cost", "0", .description = "Стоимость услуги (используйте отрицательное значение и тогда будет в + как награда)"), CVAR[COST]);
bind_pcvar_num(create_cvar("rt_notification", "1", .description = "Метод уведомлений при воскрешении^n0 - всем^n1 - только команде^n2 - только тому кто поднимал и тому кто поднял^n3 - выкл", .has_min = true), CVAR[NOTIFICATION]);
bind_pcvar_num(create_cvar("rt_touch_notification", "1", .description = "Уведомлять игрока о том что можно поднять труп"), CVAR[TOUCH_NOTIFICATION]);
bind_pcvar_string(create_cvar("rt_revive_sample", "warcraft3/reincarnation.wav", .description = "Звук воскрешения трупа (опционально)"), CVAR[REVIVE_SAMPLE], charsmax(CVAR[REVIVE_SAMPLE]));
bind_pcvar_string(create_cvar("rt_mined_sample", "weapons/c4_disarm.wav", .description = "Звук когда труп заминирован (опционально)"), CVAR[MINED_SAMPLE], charsmax(CVAR[MINED_SAMPLE]));
// configs/plugins/Revive_Teammates.cfg
AutoExecConfig(.name = "Revive_Teammates");
{
if (CVAR[REVIVE_SAMPLE][0])
precache_sound(CVAR[REVIVE_SAMPLE]);
if (CVAR[MINED_SAMPLE][0])
precache_sound(CVAR[MINED_SAMPLE]);
g_iAccessFlag = read_flags(CVAR[ACCESS]);
}
}
stock UTIL_Render(const id, const fx = kRenderFxNone, const mode = kRenderNormal, const Float:flColor[] = NULL_VECTOR, const Float:fAmount = 0.0)
{
set_entvar(id, var_renderfx, fx);
set_entvar(id, var_rendermode, mode);
set_entvar(id, var_rendercolor, flColor);
set_entvar(id, var_renderamt, fAmount);
}
Хелпаните, чёт не робит
В этой теме было размещено решение! Перейти к решению.