View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 05-17-2017 , 00:05   Re: Getting Client's Max Health
Reply With Quote #4

From experience, TF2 handles maximum health differently and you might not get the values you expect from the client's m_iMaxHealth property. The player resource entity should have the correct value:

Code:
stock int TF2_GetPlayerMaxHealth(int client) {
	return GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_iMaxHealth", _, client);
}
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline