block load
{
	es_xsetinfo hsonly_exclude "knife" //put weapons here that you want to always apply damage
	
	es_xsetinfo hsonly_damagetype "2" //Dont really have to chang this, i don think the type of damage affects the players since they die right away
	es_xsetinfo hsonly_health 0
	es_xsetinfo hsonly_format 0
		
	alias hsonly_enable "es_xload headshotonly; "
	alias hsonly_disable "es_xunload headshotonly; "
	es_xsetinfo hsonly_version "2.0"
	es_xmakepublic hsonly_version
}


event player_spawn
{
	es es_xsetplayerprop event_var(userid) CCSPlayer.baseclass.m_iHealth 1124
}

event player_hurt
{
	if (event_var(weapon) notin server_var(hsonly_exclude)) do
	{
		if (event_var(hitgroup) != 1) do
		{
			es es_xsetinfo hsonly_health event_var(health)
			es es_xmath hsonly_health + event_var(dmg_health)
			es es_xsetplayerprop event_var(userid) "CCSPlayer.baseclass.m_iHealth" server_var(hsonly_health)
		}
	}
	if (event_var(health) < 1025) do
	{
		if (event_var(health) > 0) do
		{
			es_xdoblock headshotonly/kill
		}
	}
}

block kill
{
	es es_xgive event_var(userid) point_hurt
	es es_xfire event_var(userid) !self addoutput "targetname reallybadboy"
	es es_xfire event_var(userid) point_hurt addoutput "targetname hsonly_damage"
	es es_xfire event_var(userid) hsonly_damage addoutput "Damage 3000"
	
	es es_xformat hsonly_format "DamageType %1" server_var(hsonly_damagetype)
	es es_xfire event_var(userid) hsonly_damage addoutput server_var(hsonly_format)
	es es_xfire event_var(userid) hsonly_damage addoutput "DamageDelay 0.1"
	es es_xfire event_var(attacker) hsonly_damage addoutput "DamageTarget reallybadboy"
	es es_xfire event_var(userid) hsonly_damage TurnOn
	es es_xfire event_var(attacker) hsonly_damage Hurt
	es es_xfire event_var(userid) hsonly_damage kill
	es es_xfire event_var(userid) !self addoutput "targetname mmhmmtacos"
}