You can not remove the entity that way.
Try this;
Code:
action mace2_pickup()
{
	while(1)
	{
		if(vec_dist(my.x, player.x) < 50 && player.HEALTH > 0)
		{
			if(key_e && player.weapon_on == 0)
			{
				ent_create("mace2.mdl", vector(player.x, player.y, player.z), mace2_equiped);
				player.weapon_on = 1;
				break;
			}
		}
		wait(1);
	}
	ent_remove(me);
}