Учел рекомендации fl0wer Событие RG_CSGameRules_PlayerKilled = Pre переведено в Post Учел рекомендации w0w Убрал событие RG_CBasePlayer_AddAccount Убран хук Код: - SetHookChainArg(2, ATYPE_INTEGER, (BONUS_MONEY * g_iKills[Player])) добавлен натив Код: + rg_add_account(killer, get_member(killer, m_iAccount) + (BONUS_MONEY * g_iKills[killer]), AS_SET)
RG_CSGameRules_PlayerKilled = Pre
Post
RG_CBasePlayer_AddAccount
- SetHookChainArg(2, ATYPE_INTEGER, (BONUS_MONEY * g_iKills[Player]))
+ rg_add_account(killer, get_member(killer, m_iAccount) + (BONUS_MONEY * g_iKills[killer]), AS_SET)
Маленькие поправки в коде Счетчик глобального массива g_iKills переведен с else в switch Убраны дефайны счетчика убийств из-за неактуальности.
g_iKills
else
switch
Код: - RegisterHookChain(RG_CSGameRules_Killed, "@CBasePlayer_Killed_Pre", .post = false) + RegisterHookChain(RG_CSGameRules_PlayerKilled, "@CBasePlayer_Killed_Pre", .post = false)
- RegisterHookChain(RG_CSGameRules_Killed, "@CBasePlayer_Killed_Pre", .post = false) + RegisterHookChain(RG_CSGameRules_PlayerKilled, "@CBasePlayer_Killed_Pre", .post = false)
Код: - @client_disconnected + public client_disconnected(Player) Код: - SetHookChainArg(2, ATYPE_INTEGER, BONUS_MONEY) + SetHookChainArg(2, ATYPE_INTEGER, (BONUS_MONEY * g_iKills[Player]))
- @client_disconnected + public client_disconnected(Player)
- SetHookChainArg(2, ATYPE_INTEGER, BONUS_MONEY) + SetHookChainArg(2, ATYPE_INTEGER, (BONUS_MONEY * g_iKills[Player]))
C++: - #define IsPlayer(%1) (1 <= %1 <= MAX_CLIENTS + 1) C++: + #define IsPlayer(%1) (1 <= %1 <= MaxClients) Спасибо w0w Убраны настройки под дефайнами из-за неактуальности. LIMIT_HP LIMIT_AP
- #define IsPlayer(%1) (1 <= %1 <= MAX_CLIENTS + 1)
+ #define IsPlayer(%1) (1 <= %1 <= MaxClients)