Help падает hltv

asla4ok

Пользователь
Регистрация
15 Мар 2020
Сообщения
90
Симпатии
5
Предупреждения
30
OS
Linux
Amx Mod X
AMXX 1.9.0
Билд
Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.4.0.664-dev Build date: 10:46:45 Sep 19 2018 (1621)
ReGamedll
ReGameDLL version: 5.14.0.456-dev Build date: 12:02:14 Mar 13 2020
Metamod
Metamod-r v1.3.78, API (5:13) Metamod-r build: 14:04:19 Jul 21 2017 (1.3.78)
Meta модули
Код:
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0-d ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 3] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 4] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 5] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 7] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 8] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 9] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[10] MySQL RUN - mysql_amxx_i386. v1.9.0-d pl1 ANY ANY
[11] Engine RUN - engine_amxx_i386 v1.9.0-d pl1 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0-d pl1 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0-d pl1 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.12.0. pl1 ANY Never
[15] SxGeo RUN - sxgeo_amxx_i386. v2.2 pl1 ANY Never
[16] ReAimDetector RUN - reaimdetector_am v0.2.2 pl1 ANY Never
[17] Ham Sandwich RUN - hamsandwich_amxx v1.9.0-d pl1 ANY ANY
[18] CStrike RUN - cstrike_amxx_i38 v1.9.0-d pl1 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.9.0-d pl1 ANY ANY
Плагины
Код:
[ 1] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx работает
[ 2] FreshBans 1.4.0b kanagava fresh_bans.amxx работает
[ 3] Admin Loader 2.9 neygomon admin_loader.am работает
[ 4] [190] Ultimate Weapons 19.11.29 SKAJIbnEJIb ultimate_weapon работает
[ 5] [190] VIP RBS 19.12.09 SKAJIbnEJIb vip_rbs.amxx работает
[ 6] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a работает
[ 7] ReChecker Logging 1.0 custom rc_logging.amxx работает
[ 8] Admin Commands 1.9.0-dev+ AMXX Dev Team admincmd.amxx работает
[ 9] Menus Front-End 1.9.0-dev+ AMXX Dev Team menufront.amxx работает
[ 10] Commands Menu 1.9.0-dev+ AMXX Dev Team cmdmenu.amxx работает
[ 11] Players Menu 1.9.0-dev+ AMXX Dev Team plmenu.amxx работает
[ 12] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx работает
[ 13] Plugin Menu 1.9.0-dev+ AMXX Dev Team pluginmenu.amxx работает
[ 14] Admin Votes 1.9.0-dev+ AMXX Dev Team adminvote.amxx работает
[ 15] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike работает
[ 16] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx работает
[ 17] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr работает
[ 18] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am работает
[ 19] Say me and Say hp 1.4 neygomon sayme.amxx работает
[ 20] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_rank работает
[ 21] [SxGeo] Connect Info 1.0p s1lent sxgeo_connect_i работает
[ 22] Damager 0.0.6 steelzzz damager.amxx работает
[ 23] Mode 2x2 2.5re s1lent mode.amxx работает
[ 24] Lite MapChooser 2.6 neygomon lite_mapchooser работает
[ 25] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a работает
[ 26] AMX Admin Model 1.1.1 whitemike amx_adminmodel. работает
[ 27] Demo Recorder 2.4.0 F@nt0M demo_recorder.a работает
[ 28] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a работает
[ 29] Nice Killer 1.6 Got Milk? / HoHo nice_killer.amx работает
[ 30] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a работает
[ 31] ResetScore 1.0 Leo_[BH] resetscore_reap работает
[ 32] GameName Changer 1.0 neugomon gamename.amxx работает
[ 33] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am работает
[ 34] Adverts 1.0 pUzzlik adverts_message работает
[ 35] Advanced Kill Assists 1.2c Xelson next21_kill_ass работает
[ 36] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ работает
[ 37] AFK Control ReNew 1.2(a) neygomon afk_control.amx работает
[ 38] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am работает
[ 39] Yet Another Voteban 1.8 AndrewZ/voed yet_another_vot работает
[ 40] Top Award 1.0 DUKKHAZ0R top_awards.amxx работает
[ 41] Vip Test 1.0 daywer vip_test.amxx работает
[ 42] Night VIPs Private Racoon, Leo_[BH] night_vip.amxx работает
[ 43] Radio Control 1.2.9 Radius radio_control.a работает
[ 44] [CS] Chat & Voice Mana 0.3 81x08 cs_chatvoice_ma работает
[ 45] Lite Translit 2.5.7b neygomon lite_translit_m работает
45 plugins, 45 работает
Amxx Модули
Код:
MySQL 1.9.0-dev+ AMX Mod X Dev Team работает
Engine 1.9.0-dev+ AMX Mod X Dev Team работает
FakeMeta 1.9.0-dev+ AMX Mod X Dev Team работает
CSX 1.9.0-dev+ AMX Mod X Dev Team работает
ReAPI 5.12.0.192 Asmodai & s1lent работает
SxGeo 2.2 s1lent работает
ReAimDetector 0.2.2 ReHLDS Team работает
Ham Sandwich 1.9.0-dev+ AMX Mod X Dev Team работает
nVault 1.9.0-dev+ AMX Mod X Dev Team работает
CStrike 1.9.0-dev+ AMX Mod X Dev Team работает
Fun 1.9.0-dev+ AMX Mod X Dev Team работает
Sockets 1.9.0-dev+ AMX Mod X Dev Team работает
Sockets2 1.8.1.3746 HLSW Dev Team работает
Всего 13 модулей
Ошибка
Код:
f749d000-f749e000 rwxp 00053000 103:04 1179658 /lib32/libm-2.24.so
f749e000-f74bf000 r-xp 00000000 103:04 7472889 /host/46431/25883/cstrike/hltv/libsteam_api_c.so
f74bf000-f74c1000 rwxp 00020000 103:04 7472889 /host/46431/25883/cstrike/hltv/libsteam_api_c.so
f74c1000-f74c6000 rwxp 00000000 00:00 0
f74c6000-f7518000 r-xp 00000000 103:04 7472895 /host/46431/25883/cstrike/hltv/proxy_i386.so
f7518000-f751c000 rwxp 00052000 103:04 7472895 /host/46431/25883/cstrike/hltv/proxy_i386.so
f751c000-f7539000 rwxp 00000000 00:00 0
f7539000-f7550000 r-xp 00000000 103:04 7472874 /host/46431/25883/cstrike/hltv/filesystem_stdio_i386.so
f7550000-f7557000 rwxp 00016000 103:04 7472874 /host/46431/25883/cstrike/hltv/filesystem_stdio_i386.so
f7557000-f7559000 rwxp 00000000 00:00 0
f7559000-f770a000 r-xp 00000000 103:04 1179654 /lib32/libc-2.24.so
f770a000-f770b000 ---p 001b1000 103:04 1179654 /lib32/libc-2.24.so
f770b000-f770d000 r-xp 001b1000 103:04 1179654 /lib32/libc-2.24.so
f770d000-f770e000 rwxp 001b3000 103:04 1179654 /lib32/libc-2.24.so
f770e000-f7711000 rwxp 00000000 00:00 0
f7711000-f772a000 r-xp 00000000 103:04 1179668 /lib32/libpthread-2.24.so
f772a000-f772b000 r-xp 00018000 103:04 1179668 /lib32/libpthread-2.24.so
f772b000-f772c000 rwxp 00019000 103:04 1179668 /lib32/libpthread-2.24.so
f772c000-f772e000 rwxp 00000000 00:00 0
f772e000-f7731000 r-xp 00000000 103:04 1179657 /lib32/libdl-2.24.so
f7731000-f7732000 r-xp 00002000 103:04 1179657 /lib32/libdl-2.24.so
f7732000-f7733000 rwxp 00003000 103:04 1179657 /lib32/libdl-2.24.so
f7738000-f773b000 rwxp 00000000 00:00 0
f773b000-f773d000 r--p 00000000 00:00 0 [vvar]
f773d000-f773f000 r-xp 00000000 00:00 0 [vdso]
f773f000-f7762000 r-xp 00000000 103:04 1179650 /lib32/ld-2.24.so
f7762000-f7763000 r-xp 00022000 103:04 1179650 /lib32/ld-2.24.so
f7763000-f7764000 rwxp 00023000 103:04 1179650 /lib32/ld-2.24.so
ffc53000-ffc74000 rwxp 00000000 00:00 0 [stack]
./hltv_run: line 6: 11518 Aborted ./hltv $*
постоянно вылетает hltv с ошибкой ./hltv_run: line 6: 11518 Aborted ./hltv $* иногда после смены карты , а иногда прям во время нее.
настройки
name "vk.com/theloveukraine"
hostname "vk.com/theloveukraine"
offlinetext "Sorry, game is delayed. Please try again later."
Delay 40
updaterate 20
Chatmode 2
nomaster 1
Publicgame 1
Autoretry 1
Logfile 1
Maxclients 20
Maxrate 20000
adminpassword "000000000"
serverpassword "000000000"

# ========================================================
# REUNION CONFIGURATION
# ========================================================

#
# General rule for modifying this file:
# DONT CHANGE ANYTHING IF YOU DONT KNOW WHAT IT MEANS!
#


# ========================================================
# AUTHID MANAGEMENT
# ========================================================

# ClientID types (for cid_* options)
# 1: Real (or generated by HW) steam (STEAM_xx:xx:xx)
# 2: Real (or generated by HW) valve (VALVE_xx:xx:xx)
# 3: STEAM_ by IP
# 4: VALVE_ by IP
# 5: Deprecated - client will be rejected
# 6: reserved for future use
# 7: HLTV
# 8: STEAM_ID_LAN
# 9: STEAM_ID_PENDING
# 10: VALVE_ID_LAN
# 11: VALVE_ID_PENDING
# 12: STEAM_666:88:666

# Use these options to set authid's for clients

### AUTH CONTROL ###

# For Legit Steam clients (default is real STEAM_xx:xx:xx [1])
cid_Steam = 1

# Client recognized as pending when they sucessfully authorized, but did not get steam id
# REMARK: Actually, it got steamid, but it is useless (STEAM_0:0:0 for example)
# default is STEAM_ID_PENDING [9]
cid_SteamPending = 9

# for HLTV (default is HLTV [7])
cid_HLTV = 5

# for p.47 clients that do not support unique id generation (default is STEAM_ID_LAN [8])
cid_NoSteam47 = 8

# for p.48 clients that do not support unique id generation (default is VALVE_ID_LAN [10])
cid_NoSteam48 = 10

# For players having revEmu ( >= 9.74) on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_RevEmu = 1

# For players having RevEmu 2013 on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_RevEmu2013 = 1

# For players having SteamClient 2009 / revEmu > 9.82 on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_SC2009 = 1

# For players having old revEmu on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_OldRevEmu = 1

# For players having hCupa's SteamEmu on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_SteamEmu = 1

# For players having AVSMP (Cracked Steam) on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_AVSMP = 1

# For SETTI ServerScanner
# default is STEAM_xx:xx:xx generated by IP [3]
cid_Setti = 3

# For SXEI Clients
# default is real STEAM_xx:xx:xx [1]
cid_SXEI = 1

# For players having SmartSteamEmu > 1.2.4 on client-side:
# default is real STEAM_xx:xx:xx [1]
cid_SSE3 = 1


### AUTH SETTINGS ###

# ServerInfoAnswerType (0/1/2)
# Sets server answer type for query requests
# 0 = New style (Source Engine)
# 1 = Old Style (Fix favorites list for p.47 clients)
# 2 = Hybrid mode - Server is visible anywhere, but there are 3 packets generated for every serverinfo request
ServerInfoAnswerType = 2

# EnableSXEIdGeneration (0 / 1)
# Turns on steamid generation based on info sent by sXeI client
# Enable this ONLY if you have sXeI server installed!
EnableSXEIdGeneration = 0

# SC2009_RevCompatMode (0 / 1)
# Enable fix to make steamids generated for SC2009 compatible with revEmu
SC2009_RevCompatMode = 1

# SteamIdHashSalt (string)
# Salt string for SteamIDs hashing. Irreversibly changes SteamIDs. Applies only to SteamIDs generated by emulators.
# Should be more than 16 chars length. If string is empty, hashing is not applied.
SteamIdHashSalt = FDHRFRGFDfgdfgfv42dFg43d8s98a92hj3h2jh31hjGHDFGHSAdgh28dhbzbNBNADb21

# SteamIdHashDProtoCompat (0 / 1)
# Use less reliable method of SteamID hashing from dproto (deprecated).
SteamIdHashDProtoCompat = 0

# EnableGenPrefix2 (0 / 1)
# Enable second prefix (0 or 1) for generated by HW authids. Reduces chance of authid collisions. Works only with configured SteamIdHashSalt.
EnableGenPrefix2 = 1

# HLTV from this IP will be able to join the server even if cid_HLTV is set to 5 (deprecated)


### AUTHID PREFIXES ###

# IPGen_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by IP
IPGen_Prefix1 = 0

# IPGen_Prefix2 (int)
# STEAM_a:b:c
# second prefix (b) for authids generated by IP
IPGen_Prefix2 = 4

# Native_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by native auth method (Steam)
Native_Prefix1 = 0;

# RevEmu_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by Steamclient 2009
SC2009_Prefix1 = 0;

# RevEmu_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by RevEmu
RevEmu_Prefix1 = 1;

# RevEmu2013_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by RevEmu2013
RevEmu2013_Prefix1 = 1;

# OldRevEmu_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by old RevEmu
OldRevEmu_Prefix1 = 2;

# SteamEmu_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids generated by SteamEmu
SteamEmu_Prefix1 = 3;

# SteamEmu_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids assigned for AVSMP Clients (Cracked steam)
AVSMP_Prefix1 = 4;

# Setti_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids assigned for Setti server scanner
Setti_Prefix1 = 5;

# SXEI_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids assigned for sXeI clients
SXEI_Prefix1 = 6;

# SSE3_Prefix1 (int)
# STEAM_a:b:c
# first prefix (a) for authids assigned for SSE3
SSE3_Prefix1 = 7;

# Note that banid will use steamid WITHOUT any prefixes!


# ========================================================
# OTHER STUFF
# ========================================================

# LoggingMode:
# 0 = None
# 1 = Console
# 2 = Log Files
# 3 = Both
LoggingMode = 2
HLTVExcept_IP = 91.211.118.7
 

Вложения

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
237
Симпатии
4
Пол
Мужской
try

cid_HLTV = 7
 

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
2.578
Симпатии
914
Пол
Женский
А как запускаете hltv? Софтом?
Если отключить amx так же падает?
 

Vaqtincha

aggressive
Разработчик
Скриптер
Регистрация
28 Янв 2018
Сообщения
963
Симпатии
685
Пол
Мужской
[ 35] Advanced Kill Assists 1.2c Xelson next21_kill_assist.amxx

пробовать отключить этот. и если есть исходник то скинуть сюда
 

asla4ok

Пользователь
Регистрация
15 Мар 2020
Сообщения
90
Симпатии
5
Предупреждения
30

asla4ok

Пользователь
Регистрация
15 Мар 2020
Сообщения
90
Симпатии
5
Предупреждения
30
[ 35] Advanced Kill Assists 1.2c Xelson next21_kill_assist.amxx

пробовать отключить этот. и если есть исходник то скинуть сюда
#include <amxmodx>
#include <reapi>

#define ASSIST_ALGORITHM CSSTATSX /* Алгоритм для определения помощников в убийтве. По-умолчанию используется ADVANCED.
CSSTATSX — эквивалентный CSstatsX алгоритм учёта помощи по убийствам с использованием соответствующего квара. Алгоритм выбирает такого игрока, который
нанес больше всего ущерба жертве и не менее допустимого значения, определяемое кваром csstats_sql_assisthp из CSstatsX либо кваром aka_damage.
Если CSstatsX не установлен, то для просчётов используется значение aka_damage.
ADVANCED — улучшенная и более справедливая формула, которая выбирает из ряда других ассистентов такого, кто больше всего нанес урона
жертве и чей процент урона от общего ущерба от всех составляет не менее aka_damage процентов. Этот алгоритм не синхронизируется
с CSstatsX, что может повлечь к неучёту их в статистике. */

#define NAMES_LENGTH 28
#define is_user_valid(%0) (0 < %0 && %0 < g_iMaxPlayers)

#if AMXX_VERSION_NUM < 183
#define client_disconnected client_disconnect
#endif

#if REAPI_VERSION < 52121
#error This plugin supports ReAPI >=5.2.0.121
#endif

//#define DEBUG

enum
{
CSSTATSX,
ADVANCED
}

enum _:CVARS_DATA
{
CVAR_FRAG,
CVAR_MONEY,
CVAR_DAMAGE
}

enum _:pLAYER_DATA
{
DAMAGE_ON[33],
Float:DAMAGE_ON_TIME[33],
NAME[32]
}
new g_ePlayerData[33][PLAYER_DATA], g_pCvars[CVARS_DATA], g_iMaxPlayers, g_iMsgScoreInfo
new HookChain:g_pSV_WriteFullClientUpdate, HookChain:g_pCBasePlayer_Killed_Post, g_szDeathString[32], g_iAssistKiller

#if ASSIST_ALGORITHM == CSSTATSX
new g_pCvarAssistHp
#endif

public plugin_init()
{
register_plugin("Advanced Kill Assists", "1.2c", "Xelson")

RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true)
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Pre", false)
RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage_Pre", false)
DisableHookChain((g_pCBasePlayer_Killed_Post = RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true)))
DisableHookChain((g_pSV_WriteFullClientUpdate = RegisterHookChain(RH_SV_WriteFullClientUpdate, "SV_WriteFullClientUpdate", false)))
register_message(get_user_msgid("DeathMsg"), "Message_DeathMsg")

#if defined DEBUG
register_clcmd("assist", "ClCmd_Assist")
#endif

#if ASSIST_ALGORITHM == CSSTATSX
g_pCvarAssistHp = get_cvar_pointer("csstats_sql_assisthp")
#endif

g_iMsgScoreInfo = get_user_msgid("ScoreInfo")
g_iMaxPlayers = get_maxplayers() + 1
}

public plugin_cfg()
{
g_pCvars[CVAR_FRAG] = register_cvar("aka_frag", "1")
g_pCvars[CVAR_MONEY] = register_cvar("aka_money", "100")
g_pCvars[CVAR_DAMAGE] = register_cvar("aka_damage", "30.0")
}

public client_infochanged(id)
{
get_user_info(id, "name", g_ePlayerData[id][NAME], charsmax(g_ePlayerData[][NAME]))
}

public client_disconnected(id)
{
arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_Spawn_Post(id)
{
arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_TakeDamage_Pre(iVictim, iWeapon, iAttacker, Float:fDamage)
{
if(is_user_valid(iAttacker) && iVictim != iAttacker && rg_is_player_can_takedamage(iVictim, iAttacker))
{
#if ASSIST_ALGORITHM == ADVANCED
new Float:fHealth; get_entvar(iVictim, var_health, fHealth)
if(fDamage > fHealth) fDamage = fHealth
#endif
g_ePlayerData[iAttacker][DAMAGE_ON][iVictim] += floatround(fDamage)
g_ePlayerData[iAttacker][DAMAGE_ON_TIME][iVictim] = get_gametime()
}
}

public CBasePlayer_Killed_Pre(iVictim, iKiller)
{
new iAssistant, iMaxDamage
new Float:fDamageForAssist = get_pcvar_float(g_pCvars[CVAR_DAMAGE])

#if ASSIST_ALGORITHM == ADVANCED
new iTotalDamage
for(new id = 1; id < g_iMaxPlayers; id++)
{
if(is_user_connected(id))
{
if(id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > 0)
{
if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
{
iAssistant = id
iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
}
else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iMaxDamage)
iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
}
iTotalDamage += g_ePlayerData[id][DAMAGE_ON][iVictim]
}
}
if((float(iMaxDamage) / float(iTotalDamage)) * 100.0 < fDamageForAssist) iAssistant = 0
#elseif ASSIST_ALGORITHM == CSSTATSX
new iNeedDamage = g_pCvarAssistHp ? get_pcvar_num(g_pCvarAssistHp) : floatround(fDamageForAssist)
for(new id = 1; id < g_iMaxPlayers; id++)
{
if(is_user_connected(id) && id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
{
if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iNeedDamage)
{
iAssistant = id
iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
}
else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iNeedDamage)
iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
}
}
#endif

if(!iAssistant || iKiller == iVictim) return HC_CONTINUE

new szName[2][32], iLen[2], iExcess
copy(szName[1], charsmax(szName[]), g_ePlayerData[iAssistant][NAME])
iLen[1] = strlen(szName[1])

EnableHookChain(g_pSV_WriteFullClientUpdate)

new bool:bIsAssistantConnected = bool:is_user_connected(iAssistant)
if(!is_user_valid(iKiller))
{
if(bIsAssistantConnected)
{
static const szWorldName[] = "world"

iExcess = iLen[1] - NAMES_LENGTH - (sizeof szWorldName)
if(iExcess > 0) strclip(szName[1], iExcess)
formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szWorldName, szName[1])

g_iAssistKiller = iAssistant
rh_update_user_info(iAssistant)
}
}
else if(is_user_connected(iKiller))
{
g_ePlayerData[iKiller][DAMAGE_ON][iVictim] = 0

copy(szName[0], charsmax(szName[]), g_ePlayerData[iKiller][NAME])
iLen[0] = strlen(szName[0])

new iLenSum = (iLen[0] + iLen[1])
iExcess = iLenSum - NAMES_LENGTH

if(iExcess > 0)
{
new iLongest = iLen[0] > iLen[1] ? 0 : 1
new iShortest = iLongest == 1 ? 0 : 1

if(float(iExcess) / float(iLen[iLongest]) > 0.60)
{
new iNewLongest = floatround(float(iLen[iLongest]) / float(iLenSum) * float(iExcess))
strclip(szName[iLongest], iNewLongest)
strclip(szName[iShortest], iExcess - iNewLongest)
}
else strclip(szName[iLongest], iExcess)
}
formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szName[0], szName[1])

g_iAssistKiller = iKiller
rh_update_user_info(g_iAssistKiller)
}
if(bIsAssistantConnected)
{
g_ePlayerData[iAssistant][DAMAGE_ON][iVictim] = 0

new iAddMoney = get_pcvar_num(g_pCvars[CVAR_MONEY])
if(iAddMoney > 0) rg_add_account(iAssistant, iAddMoney)

if(get_pcvar_num(g_pCvars[CVAR_FRAG]))
{
new Float:fNewFrags; get_entvar(iAssistant, var_frags, fNewFrags)
fNewFrags++
set_entvar(iAssistant, var_frags, fNewFrags)

message_begin(MSG_ALL, g_iMsgScoreInfo)
write_byte(iAssistant)
write_short(floatround(fNewFrags))
write_short(get_member(iAssistant, m_iDeaths))
write_short(0)
write_short(get_member(iAssistant, m_iTeam))
message_end()
}
}

EnableHookChain(g_pCBasePlayer_Killed_Post)
return HC_CONTINUE
}

public SV_WriteFullClientUpdate(id, pBuffer)
{
if(id == g_iAssistKiller)
set_key_value(pBuffer, "name", g_szDeathString)
}

public Message_DeathMsg()
{
new iWorld = get_msg_arg_int(1)
if(iWorld == 0 && g_iAssistKiller)
set_msg_arg_int(1, ARG_BYTE, g_iAssistKiller)
}

public CBasePlayer_Killed_Post(iVictim, iKiller)
{
DisableHookChain(g_pCBasePlayer_Killed_Post)

new iAssistKiller = g_iAssistKiller; g_iAssistKiller = 0
rh_update_user_info(iAssistKiller)
}

strclip(szString[], iClip, szEnding[] = "..")
{
new iLen = strlen(szString) - 1 - strlen(szEnding) - iClip
format(szString[iLen], iLen, szEnding)
}

#if defined DEBUG
#include <hamsandwich>
public ClCmd_Assist()
{
new id[4], szArg[64]
for(new i; i < 4; i++)
{
read_argv(i + 1, szArg, charsmax(szArg))
id = str_to_num(szArg)
}
g_ePlayerData[id[1]][DAMAGE_ON][id[2]] = id[3] ? id[3] : 100
ExecuteHamB(Ham_Killed, id[2], id[0], 0)
ExecuteHamB(Ham_CS_RoundRespawn, id[2])
}
#endif
 

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
2.578
Симпатии
914
Пол
Женский
#include <amxmodx>
#include <reapi>

#define ASSIST_ALGORITHM CSSTATSX /* Алгоритм для определения помощников в убийтве. По-умолчанию используется ADVANCED.
CSSTATSX — эквивалентный CSstatsX алгоритм учёта помощи по убийствам с использованием соответствующего квара. Алгоритм выбирает такого игрока, который
нанес больше всего ущерба жертве и не менее допустимого значения, определяемое кваром csstats_sql_assisthp из CSstatsX либо кваром aka_damage.
Если CSstatsX не установлен, то для просчётов используется значение aka_damage.
ADVANCED — улучшенная и более справедливая формула, которая выбирает из ряда других ассистентов такого, кто больше всего нанес урона
жертве и чей процент урона от общего ущерба от всех составляет не менее aka_damage процентов. Этот алгоритм не синхронизируется
с CSstatsX, что может повлечь к неучёту их в статистике. */

#define NAMES_LENGTH 28
#define is_user_valid(%0) (0 < %0 && %0 < g_iMaxPlayers)

#if AMXX_VERSION_NUM < 183
#define client_disconnected client_disconnect
#endif

#if REAPI_VERSION < 52121
#error This plugin supports ReAPI >=5.2.0.121
#endif

//#define DEBUG

enum
{
CSSTATSX,
ADVANCED
}

enum _:CVARS_DATA
{
CVAR_FRAG,
CVAR_MONEY,
CVAR_DAMAGE
}

enum _:pLAYER_DATA
{
DAMAGE_ON[33],
Float:DAMAGE_ON_TIME[33],
NAME[32]
}
new g_ePlayerData[33][PLAYER_DATA], g_pCvars[CVARS_DATA], g_iMaxPlayers, g_iMsgScoreInfo
new HookChain:g_pSV_WriteFullClientUpdate, HookChain:g_pCBasePlayer_Killed_Post, g_szDeathString[32], g_iAssistKiller

#if ASSIST_ALGORITHM == CSSTATSX
new g_pCvarAssistHp
#endif

public plugin_init()
{
register_plugin("Advanced Kill Assists", "1.2c", "Xelson")

RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true)
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Pre", false)
RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage_Pre", false)
DisableHookChain((g_pCBasePlayer_Killed_Post = RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true)))
DisableHookChain((g_pSV_WriteFullClientUpdate = RegisterHookChain(RH_SV_WriteFullClientUpdate, "SV_WriteFullClientUpdate", false)))
register_message(get_user_msgid("DeathMsg"), "Message_DeathMsg")

#if defined DEBUG
register_clcmd("assist", "ClCmd_Assist")
#endif

#if ASSIST_ALGORITHM == CSSTATSX
g_pCvarAssistHp = get_cvar_pointer("csstats_sql_assisthp")
#endif

g_iMsgScoreInfo = get_user_msgid("ScoreInfo")
g_iMaxPlayers = get_maxplayers() + 1
}

public plugin_cfg()
{
g_pCvars[CVAR_FRAG] = register_cvar("aka_frag", "1")
g_pCvars[CVAR_MONEY] = register_cvar("aka_money", "100")
g_pCvars[CVAR_DAMAGE] = register_cvar("aka_damage", "30.0")
}

public client_infochanged(id)
{
get_user_info(id, "name", g_ePlayerData[id][NAME], charsmax(g_ePlayerData[][NAME]))
}

public client_disconnected(id)
{
arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_Spawn_Post(id)
{
arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_TakeDamage_Pre(iVictim, iWeapon, iAttacker, Float:fDamage)
{
if(is_user_valid(iAttacker) && iVictim != iAttacker && rg_is_player_can_takedamage(iVictim, iAttacker))
{
#if ASSIST_ALGORITHM == ADVANCED
new Float:fHealth; get_entvar(iVictim, var_health, fHealth)
if(fDamage > fHealth) fDamage = fHealth
#endif
g_ePlayerData[iAttacker][DAMAGE_ON][iVictim] += floatround(fDamage)
g_ePlayerData[iAttacker][DAMAGE_ON_TIME][iVictim] = get_gametime()
}
}

public CBasePlayer_Killed_Pre(iVictim, iKiller)
{
new iAssistant, iMaxDamage
new Float:fDamageForAssist = get_pcvar_float(g_pCvars[CVAR_DAMAGE])

#if ASSIST_ALGORITHM == ADVANCED
new iTotalDamage
for(new id = 1; id < g_iMaxPlayers; id++)
{
if(is_user_connected(id))
{
if(id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > 0)
{
if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
{
iAssistant = id
iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
}
else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iMaxDamage)
iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
}
iTotalDamage += g_ePlayerData[id][DAMAGE_ON][iVictim]
}
}
if((float(iMaxDamage) / float(iTotalDamage)) * 100.0 < fDamageForAssist) iAssistant = 0
#elseif ASSIST_ALGORITHM == CSSTATSX
new iNeedDamage = g_pCvarAssistHp ? get_pcvar_num(g_pCvarAssistHp) : floatround(fDamageForAssist)
for(new id = 1; id < g_iMaxPlayers; id++)
{
if(is_user_connected(id) && id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
{
if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iNeedDamage)
{
iAssistant = id
iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
}
else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iNeedDamage)
iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
}
}
#endif

if(!iAssistant || iKiller == iVictim) return HC_CONTINUE

new szName[2][32], iLen[2], iExcess
copy(szName[1], charsmax(szName[]), g_ePlayerData[iAssistant][NAME])
iLen[1] = strlen(szName[1])

EnableHookChain(g_pSV_WriteFullClientUpdate)

new bool:bIsAssistantConnected = bool:is_user_connected(iAssistant)
if(!is_user_valid(iKiller))
{
if(bIsAssistantConnected)
{
static const szWorldName[] = "world"

iExcess = iLen[1] - NAMES_LENGTH - (sizeof szWorldName)
if(iExcess > 0) strclip(szName[1], iExcess)
formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szWorldName, szName[1])

g_iAssistKiller = iAssistant
rh_update_user_info(iAssistant)
}
}
else if(is_user_connected(iKiller))
{
g_ePlayerData[iKiller][DAMAGE_ON][iVictim] = 0

copy(szName[0], charsmax(szName[]), g_ePlayerData[iKiller][NAME])
iLen[0] = strlen(szName[0])

new iLenSum = (iLen[0] + iLen[1])
iExcess = iLenSum - NAMES_LENGTH

if(iExcess > 0)
{
new iLongest = iLen[0] > iLen[1] ? 0 : 1
new iShortest = iLongest == 1 ? 0 : 1

if(float(iExcess) / float(iLen[iLongest]) > 0.60)
{
new iNewLongest = floatround(float(iLen[iLongest]) / float(iLenSum) * float(iExcess))
strclip(szName[iLongest], iNewLongest)
strclip(szName[iShortest], iExcess - iNewLongest)
}
else strclip(szName[iLongest], iExcess)
}
formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szName[0], szName[1])

g_iAssistKiller = iKiller
rh_update_user_info(g_iAssistKiller)
}
if(bIsAssistantConnected)
{
g_ePlayerData[iAssistant][DAMAGE_ON][iVictim] = 0

new iAddMoney = get_pcvar_num(g_pCvars[CVAR_MONEY])
if(iAddMoney > 0) rg_add_account(iAssistant, iAddMoney)

if(get_pcvar_num(g_pCvars[CVAR_FRAG]))
{
new Float:fNewFrags; get_entvar(iAssistant, var_frags, fNewFrags)
fNewFrags++
set_entvar(iAssistant, var_frags, fNewFrags)

message_begin(MSG_ALL, g_iMsgScoreInfo)
write_byte(iAssistant)
write_short(floatround(fNewFrags))
write_short(get_member(iAssistant, m_iDeaths))
write_short(0)
write_short(get_member(iAssistant, m_iTeam))
message_end()
}
}

EnableHookChain(g_pCBasePlayer_Killed_Post)
return HC_CONTINUE
}

public SV_WriteFullClientUpdate(id, pBuffer)
{
if(id == g_iAssistKiller)
set_key_value(pBuffer, "name", g_szDeathString)
}

public Message_DeathMsg()
{
new iWorld = get_msg_arg_int(1)
if(iWorld == 0 && g_iAssistKiller)
set_msg_arg_int(1, ARG_BYTE, g_iAssistKiller)
}

public CBasePlayer_Killed_Post(iVictim, iKiller)
{
DisableHookChain(g_pCBasePlayer_Killed_Post)

new iAssistKiller = g_iAssistKiller; g_iAssistKiller = 0
rh_update_user_info(iAssistKiller)
}

strclip(szString[], iClip, szEnding[] = "..")
{
new iLen = strlen(szString) - 1 - strlen(szEnding) - iClip
format(szString[iLen], iLen, szEnding)
}

#if defined DEBUG
#include <hamsandwich>
public ClCmd_Assist()
{
new id[4], szArg[64]
for(new i; i < 4; i++)
{
read_argv(i + 1, szArg, charsmax(szArg))
id = str_to_num(szArg)
}
g_ePlayerData[id[1]][DAMAGE_ON][id[2]] = id[3] ? id[3] : 100
ExecuteHamB(Ham_Killed, id[2], id[0], 0)
ExecuteHamB(Ham_CS_RoundRespawn, id[2])
}
#endif
Вставляйте с тегом код, вы же так табуляцию убиваете
 

asla4ok

Пользователь
Регистрация
15 Мар 2020
Сообщения
90
Симпатии
5
Предупреждения
30
Вставляйте с тегом код, вы же так табуляцию убиваете
Код:
#include <amxmodx>
#include <reapi>

#define ASSIST_ALGORITHM            CSSTATSX    /*     Алгоритм для определения помощников в убийтве. По-умолчанию используется ADVANCED.
    CSSTATSX — эквивалентный CSstatsX алгоритм учёта помощи по убийствам с использованием соответствующего квара. Алгоритм выбирает такого игрока, который
нанес больше всего ущерба жертве и не менее допустимого значения, определяемое кваром csstats_sql_assisthp из CSstatsX либо кваром aka_damage.
Если CSstatsX не установлен, то для просчётов используется значение aka_damage.
    ADVANCED — улучшенная и более справедливая формула, которая выбирает из ряда других ассистентов такого, кто больше всего нанес урона
жертве и чей процент урона от общего ущерба от всех составляет не менее aka_damage процентов. Этот алгоритм не синхронизируется
с CSstatsX, что может повлечь к неучёту их в статистике. */

#define NAMES_LENGTH                28
#define is_user_valid(%0)            (0 < %0 && %0 < g_iMaxPlayers)

#if AMXX_VERSION_NUM < 183
    #define client_disconnected client_disconnect
#endif

#if REAPI_VERSION < 52121
    #error This plugin supports ReAPI >=5.2.0.121
#endif

//#define DEBUG

enum
{
    CSSTATSX,
    ADVANCED
}

enum _:CVARS_DATA
{
    CVAR_FRAG,
    CVAR_MONEY,
    CVAR_DAMAGE
}

enum _:PLAYER_DATA
{
    DAMAGE_ON[33],
    Float:DAMAGE_ON_TIME[33],
    NAME[32]
}
new g_ePlayerData[33][PLAYER_DATA], g_pCvars[CVARS_DATA], g_iMaxPlayers, g_iMsgScoreInfo
new HookChain:g_pSV_WriteFullClientUpdate, HookChain:g_pCBasePlayer_Killed_Post, g_szDeathString[32], g_iAssistKiller

#if ASSIST_ALGORITHM == CSSTATSX
    new g_pCvarAssistHp
#endif

public plugin_init()
{
    register_plugin("Advanced Kill Assists", "1.2c", "Xelson")

    RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true)
    RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Pre", false)
    RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage_Pre", false)
    DisableHookChain((g_pCBasePlayer_Killed_Post = RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true)))
    DisableHookChain((g_pSV_WriteFullClientUpdate = RegisterHookChain(RH_SV_WriteFullClientUpdate, "SV_WriteFullClientUpdate", false)))
    register_message(get_user_msgid("DeathMsg"), "Message_DeathMsg")

    #if defined DEBUG
        register_clcmd("assist", "ClCmd_Assist")
    #endif

    #if ASSIST_ALGORITHM == CSSTATSX
        g_pCvarAssistHp = get_cvar_pointer("csstats_sql_assisthp")
    #endif

    g_iMsgScoreInfo = get_user_msgid("ScoreInfo")
    g_iMaxPlayers = get_maxplayers() + 1
}

public plugin_cfg()
{
    g_pCvars[CVAR_FRAG] = register_cvar("aka_frag", "1")
    g_pCvars[CVAR_MONEY] = register_cvar("aka_money", "100")
    g_pCvars[CVAR_DAMAGE] = register_cvar("aka_damage", "30.0")
}

public client_infochanged(id)
{
    get_user_info(id, "name", g_ePlayerData[id][NAME], charsmax(g_ePlayerData[][NAME]))
}

public client_disconnected(id)
{
    arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_Spawn_Post(id)
{
    arrayset(g_ePlayerData[id][DAMAGE_ON], 0, sizeof g_ePlayerData[][DAMAGE_ON])
}

public CBasePlayer_TakeDamage_Pre(iVictim, iWeapon, iAttacker, Float:fDamage)
{
    if(is_user_valid(iAttacker) && iVictim != iAttacker && rg_is_player_can_takedamage(iVictim, iAttacker))
    {
        #if ASSIST_ALGORITHM == ADVANCED
            new Float:fHealth; get_entvar(iVictim, var_health, fHealth)
            if(fDamage > fHealth) fDamage = fHealth
        #endif
        g_ePlayerData[iAttacker][DAMAGE_ON][iVictim] += floatround(fDamage)
        g_ePlayerData[iAttacker][DAMAGE_ON_TIME][iVictim] = get_gametime()
    }
}

public CBasePlayer_Killed_Pre(iVictim, iKiller)
{
    new iAssistant, iMaxDamage
    new Float:fDamageForAssist = get_pcvar_float(g_pCvars[CVAR_DAMAGE])

    #if ASSIST_ALGORITHM == ADVANCED
        new iTotalDamage
        for(new id = 1; id < g_iMaxPlayers; id++)
        {
            if(is_user_connected(id))
            {
                if(id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > 0)
                {
                    if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
                    {
                        iAssistant = id
                        iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
                    }
                    else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iMaxDamage)
                        iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
                }
                iTotalDamage += g_ePlayerData[id][DAMAGE_ON][iVictim]
            }
        }
        if((float(iMaxDamage) / float(iTotalDamage)) * 100.0 < fDamageForAssist) iAssistant = 0
    #elseif ASSIST_ALGORITHM == CSSTATSX
        new iNeedDamage = g_pCvarAssistHp ? get_pcvar_num(g_pCvarAssistHp) : floatround(fDamageForAssist)
        for(new id = 1; id < g_iMaxPlayers; id++)
        {
            if(is_user_connected(id) && id != iKiller && g_ePlayerData[id][DAMAGE_ON][iVictim] > iMaxDamage)
            {
                if(g_ePlayerData[id][DAMAGE_ON][iVictim] > iNeedDamage)
                {
                    iAssistant = id
                    iMaxDamage = g_ePlayerData[id][DAMAGE_ON][iVictim]
                }
                else if(g_ePlayerData[id][DAMAGE_ON][iVictim] == iNeedDamage)
                    iAssistant = g_ePlayerData[id][DAMAGE_ON_TIME][iVictim] > g_ePlayerData[iAssistant][DAMAGE_ON_TIME][iVictim] ? id : iAssistant
            }
        }
    #endif

    if(!iAssistant || iKiller == iVictim) return HC_CONTINUE

    new szName[2][32], iLen[2], iExcess
    copy(szName[1], charsmax(szName[]), g_ePlayerData[iAssistant][NAME])
    iLen[1] = strlen(szName[1])

    EnableHookChain(g_pSV_WriteFullClientUpdate)
    
    new bool:bIsAssistantConnected = bool:is_user_connected(iAssistant)
    if(!is_user_valid(iKiller))
    {
        if(bIsAssistantConnected)
        {
            static const szWorldName[] = "world"

            iExcess = iLen[1] - NAMES_LENGTH - (sizeof szWorldName)
            if(iExcess > 0) strclip(szName[1], iExcess)
            formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szWorldName, szName[1])

            g_iAssistKiller = iAssistant
            rh_update_user_info(iAssistant)
        }
    }
    else if(is_user_connected(iKiller))
    {
        g_ePlayerData[iKiller][DAMAGE_ON][iVictim] = 0
        
        copy(szName[0], charsmax(szName[]), g_ePlayerData[iKiller][NAME])
        iLen[0] = strlen(szName[0])

        new iLenSum = (iLen[0] + iLen[1])
        iExcess = iLenSum - NAMES_LENGTH

        if(iExcess > 0)
        {
            new iLongest = iLen[0] > iLen[1] ? 0 : 1
            new iShortest = iLongest == 1 ? 0 : 1

            if(float(iExcess) / float(iLen[iLongest]) > 0.60)
            {
                new iNewLongest = floatround(float(iLen[iLongest]) / float(iLenSum) * float(iExcess))
                strclip(szName[iLongest], iNewLongest)
                strclip(szName[iShortest], iExcess - iNewLongest)
            }
            else strclip(szName[iLongest], iExcess)
        }
        formatex(g_szDeathString, charsmax(g_szDeathString), "%s + %s", szName[0], szName[1])

        g_iAssistKiller = iKiller
        rh_update_user_info(g_iAssistKiller)
    }
    if(bIsAssistantConnected)
    {   
        g_ePlayerData[iAssistant][DAMAGE_ON][iVictim] = 0

        new iAddMoney = get_pcvar_num(g_pCvars[CVAR_MONEY])
        if(iAddMoney > 0) rg_add_account(iAssistant, iAddMoney)

        if(get_pcvar_num(g_pCvars[CVAR_FRAG]))
        {
            new Float:fNewFrags; get_entvar(iAssistant, var_frags, fNewFrags)
            fNewFrags++
            set_entvar(iAssistant, var_frags, fNewFrags)

            message_begin(MSG_ALL, g_iMsgScoreInfo)
            write_byte(iAssistant)
            write_short(floatround(fNewFrags))
            write_short(get_member(iAssistant, m_iDeaths))
            write_short(0)
            write_short(get_member(iAssistant, m_iTeam))
            message_end()
        }
    }

    EnableHookChain(g_pCBasePlayer_Killed_Post)
    return HC_CONTINUE
}

public SV_WriteFullClientUpdate(id, pBuffer)
{
    if(id == g_iAssistKiller)
        set_key_value(pBuffer, "name", g_szDeathString)
}

public Message_DeathMsg()
{
    new iWorld = get_msg_arg_int(1)
    if(iWorld == 0 && g_iAssistKiller)
        set_msg_arg_int(1, ARG_BYTE, g_iAssistKiller)
}

public CBasePlayer_Killed_Post(iVictim, iKiller)
{
    DisableHookChain(g_pCBasePlayer_Killed_Post)

    new iAssistKiller = g_iAssistKiller; g_iAssistKiller = 0
    rh_update_user_info(iAssistKiller)
}

strclip(szString[], iClip, szEnding[] = "..")
{
    new iLen = strlen(szString) - 1 - strlen(szEnding) - iClip
    format(szString[iLen], iLen, szEnding)
}

#if defined DEBUG
#include <hamsandwich>
public ClCmd_Assist()
{
    new id[4], szArg[64]
    for(new i; i < 4; i++)
    {
        read_argv(i + 1, szArg, charsmax(szArg))
        id[i] = str_to_num(szArg)
    }
    g_ePlayerData[id[1]][DAMAGE_ON][id[2]] = id[3] ? id[3] : 100
    ExecuteHamB(Ham_Killed, id[2], id[0], 0)
    ExecuteHamB(Ham_CS_RoundRespawn, id[2])
}
#endif
 

Анатолий

Заблокированные
Пользователь
Регистрация
8 Июн 2017
Сообщения
685
Симпатии
195
Пол
Мужской
ВКонтакте
e1337ace
Сверху Снизу