PlayerRankings: add cvar for nade reward
This commit is contained in:
		
							parent
							
								
									7cb24c35f6
								
							
						
					
					
						commit
						be1d9b84b5
					
				| @ -26,6 +26,7 @@ ConVar g_hCVar_Protection; | |||||||
| ConVar g_hCVar_ProtectionMinimal1; | ConVar g_hCVar_ProtectionMinimal1; | ||||||
| ConVar g_hCVar_ProtectionMinimal2; | ConVar g_hCVar_ProtectionMinimal2; | ||||||
| ConVar g_hCVar_ProtectionMinimal3; | ConVar g_hCVar_ProtectionMinimal3; | ||||||
|  | ConVar g_hCVar_Grenade; | ||||||
| 
 | 
 | ||||||
| /* INTERGERS */ | /* INTERGERS */ | ||||||
| int g_iDialogLevel = 100000; | int g_iDialogLevel = 100000; | ||||||
| @ -44,7 +45,7 @@ public Plugin myinfo = | |||||||
| 	name         = "Player Rankings", | 	name         = "Player Rankings", | ||||||
| 	author       = "Neon & zaCade", | 	author       = "Neon & zaCade", | ||||||
| 	description  = "Show Top Defenders & Infections after each round", | 	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_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_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_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_HideCrown  = RegClientCookie("topdefenders_hidecrown",  "", CookieAccess_Private); | ||||||
| 	g_hCookie_HideDialog = RegClientCookie("topdefenders_hidedialog", "", 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); | 			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++) | 	for (int i = 0; i < sizeof(g_iPlayerWinner); i++) | ||||||
| 	{ | 	{ | ||||||
| 		if (g_iPlayerWinner[i] == steamAccountID) | 		if (g_iPlayerWinner[i] == steamAccountID) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 neon
						neon