checking if health perk from smrpg is active
This commit is contained in:
		
							parent
							
								
									c26c9255e1
								
							
						
					
					
						commit
						a14df3e10d
					
				| @ -13,6 +13,9 @@ | |||||||
| #include <clientprefs> | #include <clientprefs> | ||||||
| #include <smlib> | #include <smlib> | ||||||
| 
 | 
 | ||||||
|  | //smrpg not letting health be overwritten by zr classes | ||||||
|  | #tryinclude <smrpg_health> | ||||||
|  | 
 | ||||||
| #pragma newdecls required | #pragma newdecls required | ||||||
| //#pragma dynamic 131072  | //#pragma dynamic 131072  | ||||||
| char g_cDaysTitles[100][512]; | char g_cDaysTitles[100][512]; | ||||||
| @ -1739,10 +1742,16 @@ public Action Timer_SetSpeed(Handle timer, any userid) | |||||||
|             SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength]) + (additional_zombie_health_per_player * l_iPlayers)); |             SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength]) + (additional_zombie_health_per_player * l_iPlayers)); | ||||||
|         } |         } | ||||||
|         else if (CS_TEAM_CT == GetClientTeam(client)) |         else if (CS_TEAM_CT == GetClientTeam(client)) | ||||||
|  |         { | ||||||
|  |             // smrpg | ||||||
|  |             //checking if the health perk is used by the player, this basically makes the hp setting in the config useless most of the time. | ||||||
|  |             //but looks like people just anyways will want CT to always have 100 HP. | ||||||
|  |             if (SMRPG_Health_GetClientMaxHealth(client) == 100) | ||||||
|             { |             { | ||||||
|                 SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength])); |                 SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength])); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |     } | ||||||
|     return Plugin_Handled; |     return Plugin_Handled; | ||||||
| } | } | ||||||
| //---------------------------------------------------------------------------------------------------- | //---------------------------------------------------------------------------------------------------- | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user