BossHP_Ranking: adding hlstats-points and cash reward
This commit is contained in:
parent
5d46329380
commit
30111e6270
@ -1,6 +1,8 @@
|
||||
#include <sourcemod>
|
||||
#include <BossHP>
|
||||
|
||||
#include "loghelper.inc"
|
||||
|
||||
#include <basic>
|
||||
#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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user