BossHP_Ranking: adding hlstats-points and cash reward
This commit is contained in:
parent
5d46329380
commit
30111e6270
@ -1,6 +1,8 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <BossHP>
|
#include <BossHP>
|
||||||
|
|
||||||
|
#include "loghelper.inc"
|
||||||
|
|
||||||
#include <basic>
|
#include <basic>
|
||||||
#include "CConfig.inc"
|
#include "CConfig.inc"
|
||||||
#include "CBoss.inc"
|
#include "CBoss.inc"
|
||||||
@ -56,6 +58,11 @@ public void OnBossDamaged(any Boss, any Config, int client)
|
|||||||
if (!IsValidClient(client))
|
if (!IsValidClient(client))
|
||||||
return;
|
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++)
|
for (int index = 0; index < g_hStats[client].Length; index++)
|
||||||
{
|
{
|
||||||
any BossDamage[2];
|
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), "BOSS DAMAGE [%s]:", sBossName);
|
||||||
Format(sBuffer, sizeof(sBuffer), "%s\n*************************", sBuffer);
|
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[0][0])
|
||||||
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]);
|
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);
|
Format(sBuffer, sizeof(sBuffer), "%s\n*************************", sBuffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user