- Ошибка
-
Плагин работает криво, место брони он показывает сколько осталось жизни как его исправить.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5294
- Билд
-
3.11.0.779-dev
- ReGamedll
-
ReGameDLL version: 5.21.0.556-dev
- Версия Metamod
-
Metamod-r build: 18:51:02 Jul 11 2022
- Список метамодулей
-
[ 1] Reunion RUN - reunion.so v0.1.0.137 ini Start Never
[ 2] AMX Mod X RUN - amxmodx.so v1.9.0.5294 ini Start ANY
[ 3] ReAuthCheck RUN - reauthcheck.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker.so v2.7 ini ANY
[ 5] ReSemiclip RUN - resemiclip.so v2.3.9 ini ANY
[ 6] VoiceTranscoder RUN - vtc.so v2017RC5 ini ANY
[ 7] WHBlocker RUN - whblocker.so v1.5.697 ini ANY
[ 8] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5294 pl2 ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl2 ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl2 ANY Never
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[13] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[16] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
- Список плагинов
-
[ 1] Plugins Core 1.3.0 Radius plugins_core.am running
[ 2] CSStatsX SQL 0.7.4+2 serfreeman1337 aes_csstatsx_sq running
[ 3] Admin Loader 3.5 neygomon admin_loader.am running
[ 4] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 5] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 6] Anti Flood 1.9.0.5294 AMXX Dev Team antiflood.amxx running
[ 7] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 8] Info. Messages 1.9.0.5294 AMXX Dev Team imessage.amxx running
[ 9] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 10] NextMap 1.9.0.5294 AMXX Dev Team nextmap.amxx running
[ 11] Nextmap Chooser 1.9.0.5294 AMXX Dev Team mapchooser.amxx running
[ 12] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 13] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 14] Players Menu 1.7 neugomon players_menu.am running
[ 15] Restrict Weapons 1.9.0.5294 AMXX Dev Team restmenu.amxx running
[ 16] TimeLeft 1.9.0.5294 AMXX Dev Team timeleft.amxx running
[ 17] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 18] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 19] CS Misc. Stats 1.9.0.5294 AMXX Dev Team miscstats.amxx running
[ 20] CS Stats Logging 1.9.0.5294 AMXX Dev Team stats_logging.a running
[ 21] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 22] FreshBans 1.4.7b kanagava fresh_bans.amxx running
[ 23] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 24] Lite Translit 2.8 neygomon lite_translit.a running
[ 25] Say me and Say hp 1.4 neygomon say_me_and_say_ running
[ 26] Damager Advanced 1.2.0 Radius (based on damager_advance running
[ 27] Gag Me 2.4.0 Radius gag_me.amxx running
[ 28] Replace Info Message 2.3 maeStro aka 9iky replace_info_ms running
[ 29] Reset Score 1.3.0 Radius reset_score.amx running
[ 30] [ReAPI] Slay Loosers 1.1 neugomon slaylosers.amxx running
[ 31] [ReAPI] Block Fire in 3.1.0 F@nt0M reapi_block_fir running
[ 32] recoil_manager 1.0.0 fl0wer recoil_manager. running
[ 33] [ReAPI] Hint blocker 0.1.0 F@tn0M reapi_hint_bloc running
[ 34] Mode 2x2 2.5re s1lent mode_2x2.amxx running
[ 35] AWP Restrictions 1.6.0 Radius awp_restriction running
[ 36] Menus Front-End 1.5 neugomon menufront_end.a running
[ 37] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 38] Fake Ping 1.1 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 39] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a running
[ 40] No Team Flash 0.03 neygomon no_team_flash.a running
[ 41] Lite Admin ESP 1.0 neygomon lite_admin_esp. running
[ 42] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 43] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 44] Advert Messages 1.5.5 Radius advert_messages running
[ 45] SF Bets 0.1.5 serfreeman1337 sf_bets.amxx running
[ 46] [ReAPI] Best player of 0.6 F@nt0M best_player_of_ running
[ 47] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 48] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx.amxx running
[ 49] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 50] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 51] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 52] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 53] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 54] Map Manager: Core 3.1.5 Mistrick map_manager_cor running
[ 55] Map Manager: Scheduler 0.1.10 Mistrick map_manager_sch running
[ 56] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 57] Map Manager: Nominatio 0.2.1 Mistrick map_manager_nom running
[ 58] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 59] Map Manager: Online so 0.0.4 Mistrick map_manager_onl running
[ 60] Map Manager: Effects 0.1.1 Mistrick map_manager_eff running
[ 61] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 62] Map Manager: Sounds 0.0.2 Mistrick map_manager_sou running
- Автор плагина
- neygomon
- Версия плагина
- 1.4
- Исходный код
-
#include <amxmodx>
#include <reapi>
//#define NOT_ALIVE // Использовать /me может только МЕРТВЫЙ игрок. Чтобы разрешить всем пользоваться, закомментируйте;)
#define INFO_KILLER // Информация /me и /hp после смерти игрока
//#define NO_ROUND // Поддержка бесконечного раунда.
enum _:info
{
damage,
lasthit,
killerid,
killername[32],
Float:hpkiller,
Float:apkiller,
Float:distance
}
new g_iPlayerData[MAX_PLAYERS+1][info];
new g_iVOrigin[3], g_iKOrigin[3];
new const g_szHitPlaces[][] = { "-", "голову", "грудь", "живот", "левую руку", "правую руку", "левую ногу", "правую ногу" };
public plugin_init()
{
register_plugin("Say me and Say hp", "1.4", "neygomon");
register_event("Damage", "eventDamage", "b", "2!0");
#if defined NO_ROUND
RegisterHookChain(RG_CBasePlayer_Spawn, "fwdPlayerSpawn", true)
#else
register_event("HLTV", "eventRoundStart", "a", "1=0", "2=0");
#endif
RegisterHookChain(RG_CBasePlayer_Killed, "fwdPlayerKilled", true)
register_clcmd("say /me", "ClCmdSayMe");
register_clcmd("say_team /me", "ClCmdSayMe");
register_clcmd("say /hp", "ClCmdSayHp");
register_clcmd("say_team /hp", "ClCmdSayHp");
}
public client_putinserver(id)
{
arrayset(g_iPlayerData[id], 0, info);
}
#if defined NO_ROUND
public fwdPlayerSpawn(const id)
{
arrayset(g_iPlayerData[id], 0, info);
}
#else
public eventRoundStart()
{
for(new i = 1; i <= MAX_PLAYERS; i++)
{
arrayset(g_iPlayerData[i], 0, info);
}
}
#endif
public eventDamage(id)
{
static attacker, hit; attacker = get_user_attacker(id, 0, hit);
if(id != attacker && 1 <= attacker <= MAX_PLAYERS)
{
g_iPlayerData[attacker][damage] += read_data(2);
g_iPlayerData[attacker][lasthit] = hit;
}
}
public fwdPlayerKilled(pVictim, pKiller)
{
if(pVictim == pKiller || !is_user_connected(pKiller) || !is_user_connected(pVictim))
return;
get_user_origin(pVictim, g_iVOrigin);
get_user_origin(pKiller, g_iKOrigin);
g_iPlayerData[pVictim][hpkiller] = get_entvar(pKiller, var_health);
g_iPlayerData[pVictim][apkiller] = get_entvar(pKiller, var_armorvalue);
g_iPlayerData[pVictim][distance] = get_distance(g_iKOrigin, g_iVOrigin) * 0.0254;
g_iPlayerData[pVictim][killerid] = pKiller;
get_user_name(pKiller, g_iPlayerData[pVictim][killername], charsmax(g_iPlayerData[][killername]));
#if defined INFO_KILLER
new pKilledByBomb = get_member(pVictim, m_bKilledByBomb);
if(g_iPlayerData[pVictim][killerid] != 0 && !pKilledByBomb)
ClCmdSayHp(pVictim);
if(g_iPlayerData[pVictim][damage] != 0)
ClCmdSayMe(pVictim);
#endif
}
public ClCmdSayMe(id)
{
#if defined NOT_ALIVE
if(is_user_alive(id))
{
client_print_color(id, -2, "^4*^1Данная функция ^1доступна ^1только ^1мертвым игрокам^1!");
return PLUGIN_HANDLED;
}
#endif
switch(g_iPlayerData[id][damage])
{
case 0:client_print_color(id, -2, "^4*^1Вы ни в кого ^1не попали^1.");
default:client_print_color(id, -2, "^4*^1Вы нанесли ^4%d]^1 урона. Последнее попадание в ^4%s^1.", g_iPlayerData[id][damage], g_szHitPlaces[g_iPlayerData[id][lasthit]]);
}
return PLUGIN_HANDLED;
}
public ClCmdSayHp(id)
{
switch(g_iPlayerData[id][killerid])
{
case 0:client_print_color(id, -2, "^4*^1Вас ^1никто ^1не убивал^1.");
default:client_print_color(id, -2, "^4*^1Вас убил: ^1[^4%s^1]^1 [^4%.0f^1HP, ^4%.0f^1AP^1] ^1с расстояния ^1%.0f^1 метров^1.", g_iPlayerData[id][killername], g_iPlayerData[id][distance], g_iPlayerData[id][hpkiller], g_iPlayerData[id][apkiller]);
}
return PLUGIN_HANDLED;
}
Плагин работает криво, место брони он показывает сколько осталось жизни как его исправить.
В этой теме было размещено решение! Перейти к решению.
Вложения
-
16.7 KB Просмотры: 179