diff --git a/BossHP/scripting/BossHP_Ranking.sp b/BossHP/scripting/BossHP_Ranking.sp index 663c5bfd..21f03d55 100644 --- a/BossHP/scripting/BossHP_Ranking.sp +++ b/BossHP/scripting/BossHP_Ranking.sp @@ -1,6 +1,8 @@ #include #include +#include "loghelper.inc" + #include #include "CConfig.inc" #include "CBoss.inc" @@ -56,6 +58,11 @@ public void OnBossDamaged(any Boss, any Config, int client) if (!IsValidClient(client)) return; + int iCurrentCash = GetEntProp(client, Prop_Send, "m_iAccount"); + + if (iCurrentCash < 16000) + SetEntProp(client, Prop_Send, "m_iAccount", iCurrentCash + 1); + for (int index = 0; index < g_hStats[client].Length; index++) { any BossDamage[2]; @@ -144,9 +151,21 @@ public void OnBossKilled(any Boss, any Config, int reason) Format(sBuffer, sizeof(sBuffer), "BOSS DAMAGE [%s]:", sBossName); Format(sBuffer, sizeof(sBuffer), "%s\n*************************", sBuffer); - if (iSortedList[0][0]) Format(sBuffer, sizeof(sBuffer), "%s\n1. %N - %d hits", sBuffer, iSortedList[0][0], iSortedList[0][1]); - if (iSortedList[1][0]) Format(sBuffer, sizeof(sBuffer), "%s\n2. %N - %d hits", sBuffer, iSortedList[1][0], iSortedList[1][1]); - if (iSortedList[2][0]) Format(sBuffer, sizeof(sBuffer), "%s\n3. %N - %d hits", sBuffer, iSortedList[2][0], iSortedList[2][1]); + if (iSortedList[0][0]) + { + Format(sBuffer, sizeof(sBuffer), "%s\n1. %N - %d hits", sBuffer, iSortedList[0][0], iSortedList[0][1]); + LogPlayerEvent(iSortedList[0][0], "triggered", "most_boss_damage"); + } + if (iSortedList[1][0]) + { + Format(sBuffer, sizeof(sBuffer), "%s\n2. %N - %d hits", sBuffer, iSortedList[1][0], iSortedList[1][1]); + LogPlayerEvent(iSortedList[0][0], "triggered", "second_most_boss_damage"); + } + if (iSortedList[2][0]) + { + Format(sBuffer, sizeof(sBuffer), "%s\n3. %N - %d hits", sBuffer, iSortedList[2][0], iSortedList[2][1]); + LogPlayerEvent(iSortedList[0][0], "triggered", "third_most_boss_damage"); + } Format(sBuffer, sizeof(sBuffer), "%s\n*************************", sBuffer);