#include <amxmodx>
#include <amxmisc>
#include <reapi>
#pragma semicolon 1
new const PLUGIN_NAME[] = "Players Max Health";
new const PLUGIN_VERSION[] = "1.0.0";
new const PLUGIN_AUTHOR[] = "w0w";
/****************************************************************************************
****************************************************************************************/
new Float:g_flMaxHealth;
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_event_ex("Health", "event_Health", RegisterEvent_Single|RegisterEvent_OnlyAlive);
new pCvar;
pCvar = create_cvar("players_max_health", "35", FCVAR_NONE, "Players max health", true, 1.0);
bind_pcvar_float(pCvar, g_flMaxHealth);
AutoExecConfig(true, "players_max_health");
}
public event_Health(id)
{
if(Float:get_entvar(id, var_health) > g_flMaxHealth)
set_entvar(id, var_health, g_flMaxHealth);
}