- Ошибка
-
Ошибки не большие.
- ОС
- Linux
- Amx Mod X
-
v1.10.0.5435
- Билд
-
ReHLDS version: 3.11.0.767-dev-mpatch
- ReGamedll
-
ReGameDLL version: 5.21.0.540-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 2] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 3] Rechecker RUN - rechecker.so v2.7 ini Chlvl ANY
[ 4] ProcessCmds RUN - processcmds_mm_i386.so v1.2.0 ini Start Never
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker.so v1.5.697 ini Chlvl ANY
[ 7] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5435 ini Start ANY
[ 8] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[9] CSX RUN - csx_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[10] Engine RUN - engine_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[13] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.21.0.248-dev pl8 ANY Never
[17] SQLite RUN - sqlite_amxx_i386.so v1.10.0.5435 pl8 ANY ANY
[18] SxGeo RUN - sxgeo_amxx_i386.so v2.2 pl8 ANY Never
[19] VTC AMXX API RUN - VtcApi_amxx_i386.so v2017 RC2 pl8 ANY ANY
- Список плагинов
-
[ 1] 0 GameCMS_API 5.5.1 zhorzh78 unknown gamecms.amx running
[ 2] 1 Advanced Client Checke 0.3.6 Mistrick unknown checker.amx running
[ 3] 2 FreshBans 1.4.5b kanagava fresh_bans. running
[ 4] 3 Advanced Rechecker 0.4 F@nt0M unknown rechecker.a running
[ 5] 4 [190] MapChooser RBS 20.08.02 SKAJIbnEJIb & UF unknown mapchooser_ running
[ 6] 5 [190] Ultimate Weapons 21.08.23BE SKAJIbnEJIb unknown ultimate_we running
[ 7] 6 [190] Ultimate Flags 20.06.06 SKAJIbnEJIb unknown ultimate_fl running
[ 8] 7 Players Menu 1.7 neugomon unknown players_men running
[ 9] 8 Advanced Gag 1.9.0 neygomon unknown amx_gag.amx running
[ 10] 9 Rock to Ban 1.02 Safety1st unknown rock2ban.am running
[ 11] 10 [190] Ultimate Informe 21.03.23 SKAJIbnEJIb unknown ultimate_in running
[ 12] 11 [190] VIP RBS 21.08.23BE SKAJIbnEJIb unknown vip_rbs.amx running
[ 13] 12 [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb unknown army_ranks_ running
[ 14] 13 [190] Ultimate Models 21.08.23BE SKAJIbnEJIb unknown ultimate_mo running
[ 15] 14 Menus Front-End 20.06.06 SKAJIbnEJIb & AM unknown amxmodmenu_ running
[ 16] 15 [190] DemoRecorder RBS 20.06.06 SKAJIbnEJIb unknown demorecorde running
[ 17] 16 [190] BackWeapons RBS 20.06.06 SKAJIbnEJIb & ho unknown backweapons running
[ 18] 17 [190] BonusMenu RBS 21.08.23BE SKAJIbnEJIb unknown bonusmenu_r running
[ 19] 18 [190] AR Pogony 20.06.06 SKAJIbnEJIb unknown ar_pogony.a running
[ 20] 19 [190] Damager RBS 20.06.06 SKAJIbnEJIb unknown damager_rbs running
[ 21] 20 [190] High Ping Kicker 20.06.06 SKAJIbnEJIb unknown hpk_rbs.amx running
[ 22] 21 [190] AC Spectator ESP 20.06.06 SKAJIbnEJIb & Ko unknown ac_esp.amxx running
[ 23] 22 [190] Parachute RBS 20.08.22BE SKAJIbnEJIb & KR unknown parachute_r running
[ 24] 23 [190] CmdMenu RBS 20.06.06 SKAJIbnEJIb & AM unknown cmdmenu_rbs running
[ 25] 24 [190] Kill Assist RBS 20.06.06 SKAJIbnEJIb & Di unknown killassist_ running
[ 26] 25 [190] AfkKicker RBS 21.08.22BE SKAJIbnEJIb unknown afkkicker_r running
[ 27] 26 [190] Top Award RBS 20.06.06 SKAJIbnEJIb unknown topaward_rb running
[ 28] 27 [190] Jobs RBS 21.08.23BE SKAJIbnEJIb unknown jobs_rbs.am running
[ 29] 28 [190] Chat RBS 20.10.24BE SKAJIbnEJIb unknown chat_rbs.am running
[ 30] 29 [190] AR Bets 20.06.06 SKAJIbnEJIb unknown ar_bets.amx running
[ 31] 30 [190] CsStats MySQL 21.08.22BE SKAJIbnEJIb unknown csstats_mys running
[ 32] 31 [190] Stats Configurat 20.06.06 SKAJIbnEJIb & AM unknown statscfg_rb running
[ 33] 32 [190] StatsX RBS 21.03.23 SKAJIbnEJIb & AM unknown statsx_rbs. running
[ 34] 33 Maps Menu 1.10.0.543 AMXX Dev Team mapsmenu.am running
[ 35] 34 Restrict Weapons 1.10.0.543 AMXX Dev Team restmenu.am running
[ 36] 35 Auto Team Balance Adva 1.5.1 Radius unknown auto_team_b running
[ 37] 36 [ReAPI] No Team Flash 0.0.3 Vaqtincha unknown no_team_fla running
[ 38] 37 Autoresponder/Advertis 0.5 MaximusBrood unknown reklama_in_ running
[ 39] 38 SpecList 1.5 FatalisDK+Seroff unknown speclist.am running
[ 40] 39 Reset Score 0.0.2f wopox1337 unknown resetScore. running
[ 41] 40 GameCMS_Registration 1.5 zhorzh78 unknown gamecms_reg running
[ 42] 41 AWP Restrictions 1.5.1 Radius unknown awp_restric running
[ 43] 42 [ReAPI] Healthnade 0.0.2 F@nt0M unknown healthnade. running
[ 44] 43 Mode 2x2 2.5re s1lent unknown mode.amxx running
[ 45] 44 [SxGeo] Connect Info 1.0 s1lent unknown sxgeo_conne running
[ 46] 45 Style C4 Timer 3.1 OciXCrom unknown crx_c4timer running
[ 47] 46 MOTD Model 1.1.0 fl0wer unknown motd_model. running
[ 48] 47 Recoil Control 1.5 OT unknown recoil_cont running
[ 49] 48 TimeLeft 1.10.0.543 AMXX Dev Team timeleft.am running
[ 50] 49 NextMap 1.10.0.543 AMXX Dev Team nextmap.amx running
[ 51] 50 Injector X 1.0 Deadly|Darkness unknown dd_injector running
[ 52] 51 Weapon Model + Sound R 1.2 GHW_Chronic unknown ghw.amxx running
[ 53] 52 Simple Grenade Trail 1.0 seroff unknown granade_tra running
[ 54] 53 Block Change Name 1.0 DJ_WEST unknown block_chang running
[ 55] 54 [ReAPI] Ghost after de 0.0.2 steelzzz unknown ghost.amxx running
[ 56] 55 Revive Players 1.0.0 Emma Jule revive_team running
[ 57] 56 Custom Smoke 1.07 bionext unknown custom_smok running
[ 58] 57 ScreenMaker 1.1 neygomon unknown screenmaker running
[ 59] 58 GameName Changer 1.0 neugomon unknown gamename_ch running
[ 60] 59 Radio Block 1.0 Mmonster unknown radio.amxx running
[ 61] 60 Welcom to VersuS 1.0 LavriK unknown welcome_mus running
[ 62] 61 Voice Manager 1.6 Stimul voice_manag running
- Автор плагина
- Emma Jule
- Версия плагина
- 1.0.0
- Исходный код
-
// #define API // включить API (возможности для других плагинов)
// #define MODELS // мертвецы смогут иметь уникальные модельки (может быть небольшой конфликт с вашими админ/вип моделями)
#include <amxmodx>
#include <fakemeta>
#include <reapi>
// ========================================================================== //
new const BODY_CLASSNAME[] = "player_corpse";
#define StartRevive(%1) (set_entvar(%1, var_iuser1, 1))
#define StopRevive(%1) (set_entvar(%1, var_iuser1, 0))
#define IsReviving(%1) (get_entvar(%1, var_iuser1) == 1)
#define IsValidTeam(%1) (TEAM_TERRORIST <= get_member(%1, m_iTeam) <= TEAM_CT)
new const SOUND_REVIVED[] = "weapons/c4_disarmed.wav"; // звук при завершении возрождения
#if defined MODELS
new const MODEL_REVIVED_T[] = "vip"; // модель воскрешенного игрока Т
new const MODEL_REVIVED_CT[] = "vip"; // модель воскрешенного игрока КТ
#endif
// ========================================================================== //
enum any:CVARS
{
ACCESS_FLAG[1],
DURATION,
ROUND,
Float:ROUND_TIME,
PER_ROUND,
MAX_USER,
SHOOT,
Float:SPEED,
Float:DISTANCE,
Float:FLOOD,
Float:DELAY,
SPAWN,
Float:SPEED,
Float:HEALTH,
GUN[24],
COST,
PROGRESS_BAR,
BOMB,
ONE_VS_ONE,
VIP,
DIFF,
SOUND_MODE,
NOTIFICATION
}; new g_CvarValue[CVARS];
enum any:PLAYER_DATA
{
Corpse,
ReviveIndex,
ReviveCount,
Float:flDelay,
Float:flSpawnDelay
}; new g_PlayersData[MAX_PLAYERS + 1][PLAYER_DATA];
#if defined API
enum any:Forwards
{
Fw_Return,
Fw_Revive_Start,
Fw_Revived
}; new gForwards[Forwards];
#endif
// other
new iRoundPlayed, mBombPlanted, iFlagsBitSum;
public plugin_precache()
{
precache_sound(SOUND_REVIVED);
#if defined MODELS
new model_path[128];
formatex(model_path, charsmax(model_path), "models/player/%s/%s.mdl", MODEL_REVIVED_T, MODEL_REVIVED_T);
precache_model(model_path);
formatex(model_path, charsmax(model_path), "models/player/%s/%sT.mdl", MODEL_REVIVED_T, MODEL_REVIVED_T);
if (file_exists(model_path)) precache_model(model_path);
formatex(model_path, charsmax(model_path), "models/player/%s/%s.mdl", MODEL_REVIVED_CT, MODEL_REVIVED_CT);
precache_model(model_path);
formatex(model_path, charsmax(model_path), "models/player/%s/%sT.mdl", MODEL_REVIVED_CT, MODEL_REVIVED_CT);
if (file_exists(model_path)) precache_model(model_path);
#endif
}
public plugin_init()
{
register_plugin("Revive Players", "1.0.0", "Emma Jule");
register_dictionary("revive_teammates.txt");
register_message(get_user_msgid("ClCorpse"), "MsgHookClCorpse");
register_forward(FM_CmdStart, "fw_CmdStart");
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true);
RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", false);
#if defined MODELS
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoModel, "CBasePlayer_SetClientUserInfoModel", false);
#endif
CreateCvars();
#if defined API
gForwards[Fw_Revive_Start] = CreateMultiForward("rt_start_revive", ET_CONTINUE, FP_CELL, FP_CELL);
gForwards[Fw_Revived] = CreateMultiForward("rt_revived", ET_IGNORE, FP_CELL, FP_CELL);
}
public plugin_natives()
{
// register_library("ReviveTeammates");
register_native("is_user_revivng", "native_is_reviving");
}
public native_is_reviving(plugin_id, num_params)
{
// this dangerous
return is_nullent(g_PlayersData[get_param(1)][ReviveIndex]) ? false : true;
}
#else
}
#endif
public client_disconnected(id)
{
if (task_exists(id)) remove_task(id);
CorpseRemove(id);
}
public CBasePlayer_Spawn_Post(const id)
{
CorpseRemove(id);
arrayset(g_PlayersData[id], 0, PLAYER_DATA);
#if defined MODELS
rg_reset_user_model(id);
rh_update_user_info(id);
#endif
}
public CSGameRules_RestartRound()
{
iRoundPlayed = get_member_game(m_bCompleteReset) ? 0 : ++iRoundPlayed;
mBombPlanted = false;
}
public fw_CmdStart(id, uc_handle)
{
// it's checking time..
if (!is_user_alive(id))
return;
if (get_member_game(m_bRoundTerminating))
return;
if (iRoundPlayed < g_CvarValue[ROUND])
return;
if (abs(get_member_game(m_iNumTerroristWins) - get_member_game(m_iNumCTWins)) > g_CvarValue[DIFF])
return;
if (~get_user_flags(id) & iFlagsBitSum)
return;
if (g_CvarValue[VIP] && get_member(id, m_bIsVIP))
return;
if (g_CvarValue[BOMB] && mBombPlanted)
return;
new Float:gametime = get_gametime();
if (gametime - Float:get_member_game(m_fRoundStartTime) < g_CvarValue[ROUND_TIME])
return;
if (g_CvarValue[ONE_VS_ONE] && rg_is_1v1())
return;
if (get_member(id, m_iAccount) < g_CvarValue[COST])
return;
if (g_CvarValue[PER_ROUND] && g_PlayersData[id][ReviveCount] >= g_CvarValue[PER_ROUND])
return;
if (g_PlayersData[id][flDelay] > gametime)
return;
if (get_uc(uc_handle, UC_Buttons) & IN_USE && ~get_entvar(id, var_oldbuttons) & IN_USE && !g_PlayersData[id][ReviveIndex])
{
start_revive(id);
}
else if (get_entvar(id, var_oldbuttons) & IN_USE && ~get_uc(uc_handle, UC_Buttons) & IN_USE && g_PlayersData[id][ReviveIndex])
{
stop_revive(id);
}
}
public CBasePlayer_ResetMaxSpeed_Post(const this)
{
if (g_PlayersData[this][ReviveIndex])
{
set_entvar(this, var_maxspeed, g_CvarValue[SPEED]);
}
}
#if defined MODELS
public CBasePlayer_SetClientUserInfoModel(const id, infobuffer[], szNewModel[])
{
if (get_member(id, m_iNumSpawns) > 1)
{
new szModel[32]; copy(szModel, charsmax(szModel), get_member(id, m_iTeam) == TEAM_CT ? MODEL_REVIVED_CT : MODEL_REVIVED_T);
if (strcmp(szNewModel, szModel) != 0) SetHookChainArg(3, ATYPE_STRING, szModel);
}
return HC_CONTINUE;
}
#endif
// Bomb Featrues
public PlantBomb()
{
mBombPlanted = true;
}
start_revive(id)
{
if (g_PlayersData[id][ReviveIndex])
{
stop_revive(id);
}
new pArray[MAX_PLAYERS], pNum;
get_players(pArray, pNum, "be", get_member(id, m_iTeam) == TEAM_CT ? "CT" : "TERRORIST");
if (!pArray[0] || !pNum)
return;
new Float:flPlayerOrigin[3]; get_entvar(id, var_origin, flPlayerOrigin);
for (new i, pPlayer, pEnt, Float:flEntityOrigin[3]; i < pNum; i++)
{
pPlayer = pArray[i];
pEnt = g_PlayersData[pPlayer][Corpse];
if (is_nullent(pEnt))
continue;
if (IsReviving(pEnt))
continue;
/* ?
if (get_entvar(pEnt, var_owner) != pPlayer)
continue;
*/
get_entvar(pEnt, var_origin, flEntityOrigin);
if (vector_distance(flPlayerOrigin, flEntityOrigin) > g_CvarValue[DISTANCE])
continue;
if (g_CvarValue[DELAY])
{
if (g_PlayersData[pPlayer][flSpawnDelay] > get_gametime())
continue;
}
if (g_CvarValue[MAX_USER])
{
if (get_member(pPlayer, m_iNumSpawns) > g_CvarValue[MAX_USER])
continue;
}
#if defined API
ExecuteForward(gForwards[Fw_Revive_Start], gForwards[Fw_Return], pPlayer, id);
if (gForwards[Fw_Return] >= PLUGIN_HANDLED)
continue;
#endif
client_print(id, print_center, "%l", "RT_REVIVING", pPlayer);
client_print(pPlayer, print_center, "%l", "RT_REVIVING2", id);
StartRevive(pEnt);
g_PlayersData[id][ReviveIndex] = pEnt;
if (g_CvarValue[SPEED])
{
rg_reset_maxspeed(id);
}
if (g_CvarValue[PROGRESS_BAR])
{
rg_send_bartime(id, g_CvarValue[DURATION], bool:(g_CvarValue[PROGRESS_BAR] == 1));
}
if (!g_CvarValue[SHOOT])
{
set_member(id, m_bIsDefusing, true);
}
set_task(float(g_CvarValue[DURATION]), "respawn_friendly", id);
RequestFrame("CBasePlayer_PreThink", id);
break;
}
}
stop_revive(id)
{
if (!g_PlayersData[id][ReviveIndex])
return;
new ent = g_PlayersData[id][ReviveIndex];
StopRevive(ent);
g_PlayersData[id][ReviveIndex] = 0;
g_PlayersData[id][flDelay] = get_gametime() + g_CvarValue[FLOOD];
if (g_CvarValue[SPEED])
{
rg_reset_maxspeed(id);
}
if (g_CvarValue[PROGRESS_BAR])
{
rg_send_bartime(id, 0);
}
if (!g_CvarValue[SHOOT])
{
set_member(id, m_bIsDefusing, false);
}
// I think that mistake(
if (task_exists(id)) remove_task(id);
}
public CBasePlayer_PreThink(id)
{
if (!is_user_alive(id))
{
stop_revive(id);
}
else
{
if (!g_PlayersData[id][ReviveIndex])
return;
new Float:origin[3], Float:origin2[3];
get_entvar(id, var_origin, origin);
get_entvar(g_PlayersData[id][ReviveIndex], var_origin, origin2);
if (vector_distance(origin, origin2) > g_CvarValue[DISTANCE])
{
stop_revive(id);
client_print_color(id, print_team_red, "%l %l", "RT_PREFIX", "RT_DISTANCE_FAIL");
}
else
{
RequestFrame("CBasePlayer_PreThink", id);
}
}
}
public respawn_friendly(id)
{
new ent = g_PlayersData[id][ReviveIndex];
if (is_nullent(ent))
return;
stop_revive(id);
new player = get_entvar(ent, var_owner);
if (get_member_game(m_bRoundTerminating) || get_member(player, m_iTeam) != get_entvar(ent, var_team))
return;
// cvars gameplay checking
if (g_CvarValue[BOMB] && mBombPlanted || g_CvarValue[ONE_VS_ONE] && rg_is_1v1() || get_member(id, m_iAccount) < g_CvarValue[COST])
return;
rg_round_respawn(player);
if (g_CvarValue[SPAWN])
{
new Float:fOrigin[3]; get_entvar(ent, var_origin, fOrigin);
engfunc(EngFunc_SetOrigin, player, fOrigin);
set_entvar(player, var_flags, get_entvar(player, var_flags) | FL_DUCKING);
set_entvar(player, var_view_ofs, Float:{ 0.0, 0.0, 12.0 });
}
set_entvar(player, var_health, g_CvarValue[HEALTH]);
if (g_CvarValue[GUN][0])
{
new item = rg_give_item(player, fmt("weapon_%s", g_CvarValue[GUN]), GT_APPEND);
if (!is_nullent(item))
{
new WeaponIdType:weaponId = get_member(item, m_iId);
set_member(player, m_rgAmmo, rg_get_weapon_info(weaponId, WI_MAX_ROUNDS), rg_get_weapon_info(weaponId, WI_AMMO_TYPE));
}
}
else
{
rg_remove_all_items(player);
rg_give_default_items(player);
}
switch (g_CvarValue[NOTIFICATION])
{
case 1: client_print_color(0, id, "%l %l", "RT_PREFIX", "RT_NOTIFY_ALL", id, player);
case 2:
{
client_print_color(id, player, "%l %l", "RT_PREFIX", "RT_NOTIFY_OWNER", player);
client_print_color(player, id, "%l %l", "RT_PREFIX", "RT_NOTIFY_REVIVED", id);
}
}
switch (g_CvarValue[SOUND_MODE])
{
case 1: rh_emit_sound2(id, 0, CHAN_BODY, SOUND_REVIVED);
case 2:
{
rg_send_audio(id, SOUND_REVIVED);
rg_send_audio(player, SOUND_REVIVED);
}
}
#if defined API
ExecuteForward(gForwards[Fw_Revived], gForwards[Fw_Return], player, id);
#endif
rg_add_account(id, -g_CvarValue[COST]);
g_PlayersData[id][ReviveCount]++;
g_PlayersData[player][flSpawnDelay] = get_gametime() + g_CvarValue[DELAY];
}
public MsgHookClCorpse()
{
new ent = rg_create_entity("info_target");
if (is_nullent(ent))
return PLUGIN_CONTINUE;
new player = get_msg_arg_int(12);
if (!IsValidTeam(player))
return PLUGIN_CONTINUE;
g_PlayersData[player][Corpse] = ent;
new Float:origin[3], Float:angles[3];
get_entvar(player, var_origin, origin);
get_entvar(player, var_angles, angles);
/*
for (new i; i < 2; i++)
{
origin[i] = float(get_msg_arg_int(2 + i)) / 128.0;
angles[i] = get_msg_arg_float(5 + i);
}
*/
new model[32]; get_msg_arg_string(1, model, charsmax(model));
engfunc(EngFunc_SetModel, ent, fmt("models/player/%s/%s.mdl", model, model));
engfunc(EngFunc_SetSize, ent, Float:{ -24.0, -24.0, 0.0 }, Float:{ 24.0, 24.0, 24.0 });
engfunc(EngFunc_SetOrigin, ent, origin);
//engfunc(EngFunc_DropToFloor, ent);
set_entvar(ent, var_classname, BODY_CLASSNAME);
set_entvar(ent, var_angles, angles);
set_entvar(ent, var_body, get_msg_arg_int(10));
set_entvar(ent, var_framerate, 1.0);
set_entvar(ent, var_animtime, 0.0);
set_entvar(ent, var_sequence, get_msg_arg_int(9));
set_entvar(ent, var_owner, player);
set_entvar(ent, var_team, get_msg_arg_int(11));
StopRevive(ent);
return PLUGIN_HANDLED;
}
CreateCvars()
{
// флаг доступа
bind_pcvar_string(create_cvar("rt_access_flag", "", .description = "Флаг(и) доступа администратора (^"^" - доступно всем)"), g_CvarValue[ACCESS_FLAG], charsmax(g_CvarValue[ACCESS_FLAG]));
iFlagsBitSum = read_flags(g_CvarValue[ACCESS_FLAG]);
// время события
bind_pcvar_num(create_cvar("rt_duration", "5", .description = "Время через которое воскреснит союзник", .has_min = true, .min_val = 1.0, .has_max = true, .max_val = 10.0), g_CvarValue[DURATION]);
// ограничение по раундам
bind_pcvar_num(create_cvar("rt_round", "3", .description = "С какого раунда это будет доступно?", .has_min = true), g_CvarValue[ROUND]);
// ограничение по времени
bind_pcvar_float(create_cvar("rt_round_time", "10.0", .description = "Это будет доступно через Х сек. от начала раунда [0 - выкл]", .has_min = true, .has_max = true, .max_val = 30.0), g_CvarValue[ROUND_TIME]);
// ограничение по кол-ву
bind_pcvar_num(create_cvar("rt_per_round", "0", .description = "Максимальное кол-во раз сколько может игрок воскресить союзников за раунд [0 - бесконечно]", .has_min = true), g_CvarValue[PER_ROUND]);
// ограничение по кол-ву
bind_pcvar_num(create_cvar("rt_max_respawns", "0", .description = "Максимальное кол-во раз сколько может воскреснуть игрок за раунд [0 - бесконечно]", .has_min = true), g_CvarValue[MAX_USER]);
// запрещаем стрельбу
bind_pcvar_num(create_cvar("rt_can_shoot", "1", .description = "Могу ли я стрелять во время события", .has_min = true, .has_max = true, .max_val = 1.0), g_CvarValue[SHOOT]);
// скорость
bind_pcvar_float(create_cvar("rt_speed", "150.0", .description = "Скорость игрока во время события [0 - будет неизменной]", .has_min = true, .has_max = true, .max_val = 250.0), g_CvarValue[SPEED]);
if (g_CvarValue[SPEED]) RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "CBasePlayer_ResetMaxSpeed_Post", true);
// дистанция
bind_pcvar_float(create_cvar("rt_distance", "150.0", .description = "Максимальная допустимая дистанция", .has_min = true, .min_val = 64.0, .has_max = true, .max_val = 300.0), g_CvarValue[DISTANCE]);
// спам
bind_pcvar_float(create_cvar("rt_flood", "1.0", .description = "Через сколько могу использовать вновь (spam protect)", .has_min = true, .min_val = 0.1), g_CvarValue[FLOOD]);
// ограничение по времени
bind_pcvar_float(create_cvar("rt_delay", "15.0", .description = "Через сколько можно будет воскрешать умершего игрока", .has_min = true, .has_max = true, .max_val = 15.0), g_CvarValue[DELAY]);
// спаун-режим
bind_pcvar_num(create_cvar("rt_spawn_mode", "1", .description = "Режим возрождения^n^n0. возрождается на базе^n1. возрождается там где умер", .has_min = true, .has_max = true, .max_val = 1.0), g_CvarValue[SPAWN]);
// здоровье
bind_pcvar_float(create_cvar("rt_health", "50.0", .description = "здоровье воскрешенного игрока", .has_min = true, .min_val = 1.0, .has_max = true, .max_val = 255.0), g_CvarValue[HEALTH]);
// аммуниция
bind_pcvar_string(create_cvar("rt_weapon", "", .description = "Оружиме воскрешенного игрока (^"^" - как обычно Т - glock | CT - usp)"), g_CvarValue[GUN], charsmax(g_CvarValue[GUN]));
if (!CheckIsCvarPossible(g_CvarValue[GUN])) server_print("[Revive Teammates] Некорректно заполнен квар rt_weapon");
// стоимость
bind_pcvar_num(create_cvar("rt_cost", "0", .description = "Стоимость услуги [0 - соответственно бесплатно]", .has_min = true), g_CvarValue[COST]);
// полоска
bind_pcvar_num(create_cvar("rt_progress_bar", "1", .description = "Линия прогресса^n^n0. выкл^n1. вкл^n2. вкл (но те кто наблюдают за игроком не увидят это)", .has_min = true, .has_max = true, .max_val = 2.0), g_CvarValue[PROGRESS_BAR]);
// бомба
bind_pcvar_num(create_cvar("rt_bomb", "0", .description = "Блокируем возрождения когда бобма установленна?", .has_min = true, .has_max = true, .max_val = 1.0),g_CvarValue[BOMB]);
if (g_CvarValue[BOMB] && get_member_game(m_bMapHasBombTarget)) RegisterHookChain(RG_PlantBomb, "PlantBomb", true);
// 1 vs 1
bind_pcvar_num(create_cvar("rt_1v1", "0", .description = "Блокируем возрождения когда остались 1 vs 1?", .has_min = true, .has_max = true, .max_val = 1.0), g_CvarValue[ONE_VS_ONE]);
// VIP
bind_pcvar_num(create_cvar("rt_vip", "1", .description = "Сможет ли VIP игрок воскрешать союзников? (на as_* картах)", .has_min = true, .has_max = true, .max_val = 1.0), g_CvarValue[VIP]);
// балансер
bind_pcvar_num(create_cvar("rt_score_diff", "20", .description = "Если разница между победами команд превышает это значение, то мы блокируем воскрешения?", .has_min = true, .min_val = 3.0), g_CvarValue[DIFF]);
// звуки
bind_pcvar_num(create_cvar("rt_sounds", "1", .description = "Звуки событий (изменить их вы можете в исходном коде^n^n0. выкл^n1. через rh_emit_sound2^n2. через rg_send_audio (исключительно игроку)", .has_min = true, .has_max = true, .max_val = 2.0), g_CvarValue[SOUND_MODE]);
// уведомления
bind_pcvar_num(create_cvar("rt_notifications", "1", .description = "Уведомления..^n^n0. выкл^n1. видно всем^n2. только воскресившему игроку и тот кто воскрешал его", .has_min = true, .has_max = true, .max_val = 2.0), g_CvarValue[NOTIFICATION]);
// расположение: ..ddir/addons/amxmodx/configs/plugins/ReviveTeammates.cfg
AutoExecConfig(.name = "ReviveTeammates");
}
CorpseRemove(id)
{
new corpse = g_PlayersData[id][Corpse];
if (!is_nullent(corpse)) set_entvar(corpse, var_flags, FL_KILLME);
g_PlayersData[id][Corpse] = 0;
}
CheckIsCvarPossible(const cvar[])
{
if (!cvar[0])
return true;
// ConnorMcLeod
new const weaponEntities[][] = { "p228", "scout", "xm1014", "mac10", "aug", "elite",
"fiveseven", "ump45", "sg550", "galil", "famas", "usp", "glock18", "awp", "mp5navy",
"m249", "m3", "m4a1", "tmp", "g3sg1", "deagle", "sg552", "ak47", "p90" };
for (new i; i < sizeof(weaponEntities); i++)
if (strcmp(weaponEntities[i], cvar) == 0)
return true;
return false;
}
stock bool:rg_is_1v1()
{
new alive_t, alive_ct; rg_initialize_player_counts(alive_t, alive_ct);
return bool:(alive_t == 1 && alive_ct == 1);
}
Всем привет! В общем суть такова , в конфиге который после смены карты появляется, есть выдать флаг для оживления, по умолчанию стоит d , проблема в том что какой бы флаг я не ставил вип игроки могут оживлять, но по флагу в работе плагина я выставляю в конфиге флаг для админов и всё равно випы оживляют, как исправить чтоб оживляли именно по флагу только и всё. Чтоб можно было менять флаг, и работа именно плагина была через флаг.
Ниже прикрепил исходник в архиве.
Ниже прикрепил исходник в архиве.
В этой теме было размещено решение! Перейти к решению.
Вложения
-
6.6 KB Просмотры: 253