
public reset_player(id)
{
	g_player_experience[id]=0;
	g_player_level[id]=BLEACH_START_LEVEL;
	g_player_attributepoints[id]=BLEACH_START_ATTRIBUTEPOINTS;
	g_player_skillpoints[id]=BLEACH_START_SKILLPOINTS;
	g_player_spirit[id]=BLEACH_START_SPIRIT_POWER;
	g_player_max_spirit[id]=BLEACH_MAXIMUM_SPIRIT_POWER+(g_player_level[id]*BLEACH_SPR_PER_LEVEL);
	g_player_current_skill[id]=0;
	
	g_player_class_selected[id]=false;
	g_player_skill_reseted[id]=false;
	g_player_negation_used[id]=false;
	
	g_player_max_health[id]=DEFAULT_MAX_HEALTH;
	g_player_max_armour[id]=DEFAULT_MAX_ARMOUR;
	
	item_reset(id);
	
	g_player_item[id]=0;
	
	if(cs_get_user_vip(id))
	{
		g_player_max_armour[id]+=100;
	}
}

public reset_player_attributes(id)
{
	g_player_athletic[id]=0.0;
	g_player_acrobatic[id]=1.0;
	g_player_endurance[id]=0;
}

public reset_player_skills(id)
{
	g_skill[id][P_SKILL_1]=0;
	g_skill[id][P_SKILL_2]=0;
	g_skill[id][P_SKILL_3]=0;
	g_skill[id][P_SKILL_4]=0;
	g_skill[id][P_SKILL_5]=0;
	g_skill[id][P_SKILL_6]=0;
}

public reset_player_all()
{
	new players[MAXPLAYERS],id;
	static num;
	get_players(players,num,"ch");
	
	if(!g_event_round_end)
	{
		set_cvar_num("sv_restart",2);
	}
	
	for (new i; i < num; ++i)
	{
		id=players[i];
		if(is_user_connected(id))
		{
			reset_player(id);
			reset_player_attributes(id);
			reset_player_skills(id);
			restore_cooldowns(id);
			restore_player(id);
			g_player_class[id]=0;
			g_player_character_reseted[id]=false;
		}
	}
}

public restore_player(id)
{
	g_player_frozen[id]=false;
	g_player_burning[id]=false;
	g_player_negating[id]=false;
	g_player_cero_charged[id]=false;
	g_player_spirit_releasing[id]=false;
	g_player_in_skill[id]=false;
	g_player_died_by_skill[id]=false;
	g_player_use[id]=false;
	
	g_player_stunned[id]=0;
	g_player_frosted[id]=0;
	g_player_death_stinged[id]=0;
	g_player_volcanic_flame[id]=0;
}

public restore_cooldowns(id)
{
	static Float:time;
	time=get_gametime();
	
	g_player_last_event[id][0]=time;
	g_player_last_event[id][1]=time;
	g_player_last_event[id][2]=time;
	g_player_last_event[id][3]=time;
	g_player_last_event[id][4]=time;
	g_player_last_event[id][5]=time;
}
