Error say_me_hp

Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
Showing /me even for teammates
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5291 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Sep 17 2021 04:23:28
Built from: https://github.com/alliedmodders/amxmodx/commit/8817f3e
Build ID: 5291:8817f3e
Core mode: JIT+ASM32
Билд
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.767-dev
Build date: 03:13:55 Oct 25 2021 (2753)
Build from: https://github.com/dreamstalker/rehlds/commit/471158b
ReGamedll
ReGameDLL version: 5.21.0.546-dev
Build date: 15:32:48 Dec 28 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/09a6c61
Версия Metamod
meta version
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
meta list
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5291 ini Start ANY
[ 2] Print Center Fix RUN - printcenterfix_mm_i386.so v2.0.1 ini ANY ANY
[ 3] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 7] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl1 ANY ANY
[ 8] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl1 ANY ANY
[ 9] Admins Kit RUN - adminskit_amxx_i386.so v2.1.0 pl1 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl1 ANY Never
[11] Orpheu RUN - orpheu_amxx_i386.so v2.6.3 pl1 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[13] MySQL RUN - mysql_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[14] Engine RUN - engine_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[16] CSX RUN - csx_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[17] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[18] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
[20] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5291 pl1 ANY ANY
20 plugins, 20 running
Список плагинов
amxx plugins
Currently loaded plugins:
name version author file status
[ 1] Top Awards 1.2.0 szawesome top_awards.amxx running
[ 2] Status and Ping blocke 1.0 Shadows Adi block_status_pi running
[ 3] AntiIdleBot 2.0.0 mx?! antiindlebot.am running
[ 4] Lista admini (amx_who) cs.darkeli Kobra cwhobun.amxx running
[ 5] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 6] No Name Change 2.1 OciXCrom crx_nonamechang running
[ 7] Advanced Mute 2.1 OciXCrom crx_advmute.amx running
[ 8] [ReAPI] VIP System 1.3.1 pUzzlik re_vip_system.a running
[ 9] Check Vip 2.0 Leo_[BH] check.amxx running
[ 10] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 11] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 12] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 13] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 14] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 15] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 16] AES Bonus: Flags 0.1 Sonyx aes_bonus_flags running
[ 17] FreshBans 1.4.5b kanagava fresh_bans_145- running
[ 18] WebHS 0.1 kanagava fb_web_online.a running
[ 19] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 20] Access Manager 1.0.0 mx?! AccessManager.a debug
[ 21] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 22] Write MS 0.1 ill log_ms.amxx running
[ 23] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 24] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 25] Private Message: Core 1.5 Denzer private_message running
[ 26] Private Message: Loggi 1.3 Denzer private_message running
[ 27] Admin Commands 1.9.0.5291 AMXX Dev Team admincmd.amxx running
[ 28] Admin Help 1.9.0.5291 AMXX Dev Team adminhelp.amxx running
[ 29] Multi-Lingual System 1.9.0.5291 AMXX Dev Team multilingual.am running
[ 30] Menus Front-End 1.9.0.5291 AMXX Dev Team menufront.amxx running
[ 31] Commands Menu 1.9.0.5291 AMXX Dev Team cmdmenu.amxx running
[ 32] Players Menu 1.7 neugomon players_menu.am running
[ 33] Plugin Menu 1.9.0.5291 AMXX Dev Team pluginmenu.amxx running
[ 34] Pause Plugins 1.9.0.5291 AMXX Dev Team pausecfg.amxx running
[ 35] Stats Configuration 1.9.0.5291 AMXX Dev Team statscfg.amxx running
[ 36] Items Restrict 1.1 s1lent items_restrict. running
[ 37] Ping Faker 1.0 Hattrick pingfaker2.amxx running
[ 38] CS AFK Manager 1.0.6 (amx Freeman afk_manager_1-8 running
[ 39] unknown unknown unknown flash.amxx running
[ 40] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 41] Parachute 1.3 Fixed KRoT@L/JTP10181 parasuta.amxx running
[ 42] Last Maps Time 0.0.1 Exolent last_maps_time. running
[ 43] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 44] Advanced Spam Nick Cha 0.2 Fullserver advanced_spam_n running
[ 45] unknown unknown unknown fake.amxx running
[ 46] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 47] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 48] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 49] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 50] Reklama 09.07.2019 mx?! reklama.amxx running
[ 51] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 52] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 53] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 54] Admin Commands Log 1.2 w0w admin_commands_ running
[ 55] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 56] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 57] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 58] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 59] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 60] Voiceserver Connect 1.1.015 Nextra voiceserver_con running
[ 61] Hide 1.1 xPaw hidexpaw.amxx running
[ 62] Say Me And HP 1.0 Javekson say_me_hp.amxx running
[ 63] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 64] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 65] [ReAPI] Block 'Fire in 0.0.1 sergrib simpleblockfith running
[ 66] Online Logger 1.0.3 mx?! online_logger.a running
[ 67] 49 44 49 20 4E 41 58 59 49 ausermsg.amxx running
[ 68] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 69] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 70] Trial Access 1.0.0 mx?! trial_access.am running
[ 71] Map Manager: Core 3.1.4 Mistrick map_manager_cor running
[ 72] Map Manager: Scheduler 0.1.9 Mistrick map_manager_sch running
[ 73] Admin Mapmenu 0.5.3 d3m37r4 admin_mapmenu.a running
[ 74] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 75] Map Manager: Nominatio 0.2.0 Mistrick map_manager_nom running
[ 76] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 77] Map Manager: Online so 0.0.4 Mistrick map_manager_onl running
[ 78] Map Manager: Effects 0.1.0 Mistrick map_manager_eff running
[ 79] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 80] Map Manager: Advanced 0.1.0 Mistrick map_manager_adv running
[ 81] Map Manager: Priority 0.0.2 Mistrick map_manager_pri running
[ 82] Map Manager: Online ch 1.0.0 Sergey Shorokhov map_manager_onl running
[ 83] ChatAdditions: Core v1.8.1 Sergey Shorokhov ChatAdditions_C running
[ 84] ChatAdditions: CSBans v1.8.1 Sergey Shorokhov CA_Storage_CSBa running
[ 85] CA: Gag v1.8.1 Sergey Shorokhov CA_Gag.amxx running
[ 86] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 87] [SQL] Chat Manager 1.1.1-13 Mistrick chatmask.amxx running
[ 88] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 89] AWP Restrictions 1.5.1 Radius awp_restriction running
[ 90] Style C4 Timer 3.0 OciXCrom crx_c4timer.amx running
[ 91] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 92] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. running
92 plugins, 92 running
Автор плагина
Javekson
Версия плагина
1.0
Исходный код
#include <amxmodx>

#include <reapi>



#pragma semicolon 1



const VIP_FLAG = ADMIN_LEVEL_E;

const NAME_STRLEN = 32;

const BUFFER_STRLEN = 256;

const WEAPON_STRLEN = 32;

const ORIGIN_ARRAYLEN = 3;

const GRENADE_ITEMID = 4;

const Float:COEFF_DISTANCE = 0.0254;



enum _:ME {

ME_KILLS,

ME_DAMAGE,

ME_HITS

}



enum _:HP {

HP_KILLER_ID,

HP_WEAPON_ID,

Float:HP_LIFE,

Float:HP_ARMOR,

Float:HP_DISTANCE

}



enum _:HITBOX {

NONE,

HEAD,

CHEST,

STOMACH,

LEFTARM,

RIGHTARM,

LEFTLEG,

RIGHTLEG,

SHIELD

}



enum _:WEAPON_INFO {

WI_WEAPON_ID,

WI_WEAPON_NAME[WEAPON_STRLEN]

}



new const PART_BODY[][] = {

"-", "cap", "piept",

"stomac", "brațul stang", "brațul drept",

"piciorul stang", "piciorul drept", "scut"

};



new const WEAPONS[][WEAPON_INFO] = {

{1, "P228"}, {2, "GLOCK"}, {3, "SCOUT"},

{4, "GRENADE"}, {5, "XM1014"}, {7, "MAC10"},

{8, "AUG"}, {10, "ELITE"}, {11, "FIVESEVEN"},

{12, "UMP45"}, {13, "SG550"}, {14, "GALIL"},

{15, "FAMAS"}, {16, "USP"}, {17, "GLOCK18"},

{18, "AWP"}, {19, "MP5N"}, {20, "M249"},

{21, "M3"}, {22, "M4A1"}, {23, "TMP"},

{24, "G3SG1"}, {26, "DEAGLE"}, {27, "SG552"},

{28, "AK47"}, {29, "KNIFE"}, {30, "P90"},

};



new g_eMe[MAX_PLAYERS + 1][ME];

new g_eHP[MAX_PLAYERS + 1][HP];

new g_eHitBox[MAX_PLAYERS + 1][HITBOX];

new bool:g_bVIP[MAX_PLAYERS + 1];



public plugin_init() {

register_plugin("Say Me And HP", "1.0", "Javekson");



RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage", .post = true);

RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", .post = true);

RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed", .post = true);



register_clcmd("say /me", "ClCmdMe");

register_clcmd("say_team /me", "ClCmdMe");

register_clcmd("say /hp", "ClCmdHP");

register_clcmd("say_team /hp", "ClCmdHP");

}



public client_putinserver(id) {

g_bVIP[id] = get_user_flags(id) & VIP_FLAG ? true : false;

}



public CBasePlayer_TakeDamage(const iVictim, const pevInflictor, const iAttacker, const Float:fDamage) {

if(!is_user_connected(iAttacker) || iVictim == iAttacker) return HC_CONTINUE;



g_eMe[iAttacker][ME_DAMAGE] += floatround(fDamage, floatround_floor);

g_eMe[iAttacker][ME_HITS]++;



new iHitBox = get_member(iVictim, m_LastHitGroup);

g_eHitBox[iAttacker][iHitBox]++;



return HC_CONTINUE;

}



public CBasePlayer_Killed(const iVictim, const iKiller) {

if(!is_user_connected(iKiller) || iVictim == iKiller) return HC_CONTINUE;



if(get_member(iVictim, m_bKilledByBomb)) return HC_CONTINUE;



g_eMe[iKiller][ME_KILLS]++;



g_eHP[iVictim][HP_KILLER_ID] = iKiller;



new Float:fVictimOrigin[ORIGIN_ARRAYLEN], Float:fKillerOrigin[ORIGIN_ARRAYLEN];

get_entvar(iVictim, var_origin, fVictimOrigin);

get_entvar(iKiller, var_origin, fKillerOrigin);



g_eHP[iVictim][HP_DISTANCE] = get_distance_f(fVictimOrigin, fKillerOrigin) * COEFF_DISTANCE;



g_eHP[iVictim][HP_LIFE] = get_entvar(iKiller, var_health);

g_eHP[iVictim][HP_ARMOR] = get_entvar(iKiller, var_armorvalue);



if(get_member(iVictim, m_bKilledByGrenade)) {

g_eHP[iVictim][HP_WEAPON_ID] = GRENADE_ITEMID;

} else {

new iActiveItem = get_member(iKiller, m_pActiveItem);

if(is_nullent(iActiveItem)) return HC_CONTINUE;

g_eHP[iVictim][HP_WEAPON_ID] = get_member(iActiveItem, m_iId);

}



ClCmdHP(iVictim); ClCmdMe(iVictim);



return HC_CONTINUE;

}



public CSGameRules_RestartRound() {

arrayset(g_eMe[0], 0, sizeof(g_eMe) * sizeof(g_eMe[]));

arrayset(g_eHP[0], 0, sizeof(g_eHP) * sizeof(g_eHP[]));

arrayset(g_eHitBox[0], 0, sizeof(g_eHitBox) * sizeof(g_eHitBox[]));

}



public ClCmdMe(const id) {

if(is_user_alive(id) && !g_bVIP[id]) {

client_print_color(id, print_team_red, "^4[CS] ^1Această comandă este disponibilă doar jucătorilor ^3morți ^1sau ^3VIP");

return PLUGIN_CONTINUE;

}



if(!g_eMe[id][ME_DAMAGE]) {

client_print_color(id, print_team_red, "^4* Nu ai lovit pe nimeni");

return PLUGIN_CONTINUE;

}



client_print_color(id, print_team_red, "^4[CS] ^1Ai provocat ^3%d damage ^1, omorand ^3%d jucatori ^1, lovind de ^3%d ori", g_eMe[id][ME_DAMAGE], g_eMe[id][ME_KILLS], g_eMe[id][ME_HITS]);



new iLen, sBuffer[BUFFER_STRLEN];

for(new i = 1; i < sizeof(PART_BODY); i++) {

if(!g_eHitBox[id][i]) continue;

iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen, " ^4%s: ^3%d", PART_BODY[i], g_eHitBox[id][i]);

}



if(iLen) {

client_print_color(id, print_team_red, "^4[CS]%s", sBuffer);

}



return PLUGIN_CONTINUE;

}



public ClCmdHP(const id) {

if(!g_eHP[id][HP_KILLER_ID]) {

client_print_color(id, print_team_red, "^4[CS] ^3Nu te-a omorat nimeni.");

return PLUGIN_CONTINUE;

}



new sName[NAME_STRLEN];

get_user_name(g_eHP[id][HP_KILLER_ID], sName, charsmax(sName));



new sWeaponName[WEAPON_STRLEN];

for(new i; i < sizeof WEAPONS; i++) {

if(WEAPONS[i][WI_WEAPON_ID] == g_eHP[id][HP_WEAPON_ID]) {

formatex(sWeaponName, charsmax(sWeaponName), WEAPONS[i][WI_WEAPON_NAME]);

break;

}

}



client_print_color(id, print_team_red, "^4[CS] ^1Omorat de: ^4%s ^1cu ^3%s^1 de la distanța de ^3%dm. ^1El mai are: [^4%dHP %dAP^1]",

sName,

sWeaponName,

floatround(g_eHP[id][HP_DISTANCE], floatround_ceil),

floatround(g_eHP[id][HP_LIFE], floatround_floor),

floatround(g_eHP[id][HP_ARMOR], floatround_floor)

);



return PLUGIN_CONTINUE;

}
/me shows damage done to teammates aswell (friendlyfire 0), I would like it to show only damage done to enemies.
 
В этой теме было размещено решение! Перейти к решению.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу