PlayerRankings: add cvar for nade reward

This commit is contained in:
neon 2019-10-24 01:26:52 +02:00
parent 7cb24c35f6
commit be1d9b84b5

View File

@ -26,6 +26,7 @@ ConVar g_hCVar_Protection;
ConVar g_hCVar_ProtectionMinimal1;
ConVar g_hCVar_ProtectionMinimal2;
ConVar g_hCVar_ProtectionMinimal3;
ConVar g_hCVar_Grenade;
/* INTERGERS */
int g_iDialogLevel = 100000;
@ -44,7 +45,7 @@ public Plugin myinfo =
name = "Player Rankings",
author = "Neon & zaCade",
description = "Show Top Defenders & Infections after each round",
version = "1.1.1"
version = "1.1.2"
};
//----------------------------------------------------------------------------------------------------
@ -71,6 +72,8 @@ public void OnPluginStart()
g_hCVar_ProtectionMinimal1 = CreateConVar("sm_topdefenders_minimal_1", "15", "", FCVAR_NONE, true, 1.0, true, 64.0);
g_hCVar_ProtectionMinimal2 = CreateConVar("sm_topdefenders_minimal_2", "30", "", FCVAR_NONE, true, 1.0, true, 64.0);
g_hCVar_ProtectionMinimal3 = CreateConVar("sm_topdefenders_minimal_3", "45", "", FCVAR_NONE, true, 1.0, true, 64.0);
g_hCVar_Grenade = CreateConVar("sm_topdefenders_grenade", "1", "", FCVAR_NONE, true, 0.0, true, 1.0);
AutoExecConfig(true);
g_hCookie_HideCrown = RegClientCookie("topdefenders_hidecrown", "", CookieAccess_Private);
g_hCookie_HideDialog = RegClientCookie("topdefenders_hidedialog", "", CookieAccess_Private);
@ -596,6 +599,9 @@ public void OnClientSpawn(Event hEvent, const char[] sEvent, bool bDontBroadcast
CreateTimer(7.0, OnClientSpawnPostSkull, GetClientSerial(client), TIMER_FLAG_NO_MAPCHANGE);
}
if(!g_hCVar_Grenade.BoolValue)
return;
for (int i = 0; i < sizeof(g_iPlayerWinner); i++)
{
if (g_iPlayerWinner[i] == steamAccountID)