	
	uint classlevels_array_slots = 10; // i only use 2 so far :)
	array<int> classlevels_file_array(classlevels_array_slots); // slot 0 for exp, 1 for levels
	
	enum PlayerClassesEnum
	{
		PLAYERCLASS_NONE,
		PLAYERCLASS_NEUTRAL,
		PLAYERCLASS_CUSTOM,
		PLAYERCLASS_SCOUT,		
		PLAYERCLASS_SECURITY,
		PLAYERCLASS_MEDIEVAL,
		PLAYERCLASS_SOLDIER,
		PLAYERCLASS_MEDIC,
		PLAYERCLASS_SCIENTIST,
	};
	
	enum ClassVectorEnum
	{
		CLASSVECTOR_HEALTH,
		CLASSVECTOR_ARMOR,
		CLASSVECTOR_DAMAGE,
		CLASSVECTOR_SPEED,
		CLASSVECTOR_JUMP,
		CLASSVECTOR_HEALTH_REGEN,
		CLASSVECTOR_ARMOR_REGEN,
		CLASSVECTOR_HEALER,
		CLASSVECTOR_HANDGUNS,
		CLASSVECTOR_SWORDS,
		CLASSVECTOR_BOWS,
		CLASSVECTOR_ENGINEER,
	};
	
	int cl_maxexp;
	array<float> classvector(15);
	
	int neutral_health		=  0; int neutral_damage 	=  0; int neutral_speed 	=  0; int neutral_jump 		=  0; string neutral_description1 	= "hi";																																																		string neutral_description2 	= "hi";
	int class_health		=  0; int class_damage 		=  0; int class_speed 		=  0; int class_jump 		=  0; string class_description 		= "hi";																																				
	int scout_health		= -2; int scout_damage 		= -1; int scout_speed 		=  1; int scout_jump 		=  2; string scout_description1 	= "clase explorador\n\nvida: -2\ndanio: -1\nvelocidad:  1\nsalto:  2\n						\n\nExperto en explorar y robar digo levantar objetos abandonados." + "\nNivel:";								string scout_description2 		= "scout class\n\nhealth: -2\ndamage: -1\nspeed:  1\njump:  2						\n\nExpert in exploring and stealing i mean picking abandoned objets." + "\nLevel:";
	int security_health 	= -1; int security_damage	=  0; int security_speed 	=  1; int security_jump 	=  0; string security_description1 	= "clase seguridad\n\nvida: -1\ndanio:  0\nvelocidad:  1\nsalto:  0\n pistolas: +1			\n\nEmpleado de seguridad que sobrevivio al desastre de Black mesa para entrar a otro desastre." + "\nNivel:";	string security_description2 	= "security class\n\nhealth: -1\ndamage:  0\nspeed:  1\njump:  0\n handguns: +1		\n\nSecurity exployee who survived Black mesa mess and got dragged into another." + "\nLevel:";
	int medieval_health		=  2; int medieval_damage 	=  1; int medieval_speed 	= -1; int medieval_jump 	= -2; string medieval_description1 	= "clase medieval\n\nvida:  2\ndanio:  1\nvelocidad: -1\nsalto: -2\n espadas: +1			\n\nCaballero medieval listo para luchar por gloria y por dios."	+ "\nNivel:";								string medieval_description2 	= "medieval class\n\nhealth:  2\ndamage:  1\nspeed: -1\njump: -2\n swords: +1		\n\nMedieval knight willing to fight for glory and god." + "\nLevel:";
	int soldier_health 		=  1; int soldier_damage 	=  2; int soldier_speed 	= -2; int soldier_jump 		= -2; string soldier_description1	= "clase soldado\n\nvida:  1\ndanio:  2\nvelocidad: -2\nsalto: -2\n							\n\nSoldado listo para repartir libertad y democracia en este mundo."	+ "\nNivel:";							string soldier_description2 	= "soldier class\n\nhealth:  1\ndamage:  2\nspeed: -2\njump: -2						\n\nSoldier ready to spread liberty and democracy in this world." + "\nLevel:";
	int medic_health 		= -1; int medic_damage 		= -1; int medic_speed 		=  1; int medic_jump 		=  0; string medic_description1		= "clase medico \n\nvida: -1\ndanio: -1\nvelocidad:  1\nsalto:  0\n	curacion: +1			\n\nEspecialista en Medicina. Gran unidad de apoyo." + "\nNivel:";												string medic_description2 		= "medic class\n\nhealth: -1\ndamage: -1\nspeed:  1\njump:  0\n healing: +1			\n\nMedicine specialist. Great support unit." + "\nLevel:";
	int scientist_health 	= -2; int scientist_damage  = -2; int scientist_speed 	=  0; int scientist_jump 	=  0; string scientist_description1 = "clase cientifico \n\nvida: -2\ndanio: -2\nvelocidad:  0\nsalto:  0\n						\n\nCientifico huyendo para no ser otro zombie mas" + "\nNivel:";												string scientist_description2 	= "scientist class\n\nhealth: -2\ndamage: -2\nspeed:  0\njump:  0					\n\nScientist running to not be just another zombie" + "\nLevel:";
	//int engineer_health 	=  0; int engineer_damage   = 0 ; int engineer_speed 	=  0; int engineer_jump 	=  0; string engineer_description1 	= "clase cientifico \n\nvida: -2\ndanio: -2\nvelocidad:  0\nsalto:  0\n						\n\nCientifico huyendo para no ser otro zombie mas" + "\nNivel:";												string engineer_description2 	= "engineer class\n\nhealth: -2\ndamage: -2\nspeed:  0\njump:  0					\n\nScientist running to not be just another zombie" + "\nLevel:";
	
	string class_model = "";
	
	void ClasslevelWriteLineToFile()
	{
		string StringToWrite;
		try 
		{
			File@ file = g_FileSystem.OpenFile("scripts/maps/store/classlevels.txt", OpenFile::READ);
			if(file !is null && file.IsOpen())
			{
				while(!file.EOFReached())
				{
					string sLine;
					file.ReadLine(sLine);
					if(sLine.SubString(0,1) == "#" || sLine.IsEmpty())
						continue;
					StringToWrite = StringToWrite+sLine+"\n";
				}
			}
		}
		catch{}
		
		File@ file= g_FileSystem.OpenFile("scripts/maps/store/classlevels.txt", OpenFile::WRITE);
		if(file !is null && file.IsOpen()) //delete the file and write its values again
		{
			for ( uint I = 0; I < classlevels_array_slots; I++ )
			{
				string prefix;
				StringToWrite = string(classlevels_file_array[I]);
				file.Write( StringToWrite+"\n");
			}
			file.Close();
		}
	}

	void ClassleveReadFromFileToArray()
	{
		File@ file = g_FileSystem.OpenFile("scripts/maps/store/classlevels.txt", OpenFile::READ);
		uint i = 0;
		if(file !is null && file.IsOpen())
		{
			while(!file.EOFReached())
			{
				string sLine;
				file.ReadLine(sLine);
				//fix for linux
				string sFix = sLine.SubString(sLine.Length()-1,1);
				if(sFix == " " || sFix == "\n" || sFix == "\r" || sFix == "\t")
					sLine = sLine.SubString(0, sLine.Length()-1);
				if(sLine.SubString(0,1) == "#" || sLine.IsEmpty())
				{
					continue;
				}
				//Server console (developer 0)
				//g_EngineFuncs.ServerPrint("[read map storage line] : "+sLine +"\n");
				//Server console (developer 1)
				//g_Game.AlertMessage( at_console, "[read map storage line 2 ] : "+sLine+"\n" );
				classlevels_file_array[i] = atoi(sLine);
				i++;
			}
			file.Close();
		}
	}

	void ClasslevelSet(int clexp) // sets the level when you obtain exp
	{
		int cl_level = 0;
		cl_level = classlevels_file_array[1]; 
		int a = 3;
		int b = 7;
		int c = 30;
					
		cl_maxexp = ((((b*cl_level) + b)*((b*cl_level) + b)) - (b*b) + 4*a*c)/4*a; // quadratic equation solver related stuff | cl_maxexp = exp needed to level up
		
		while (clexp > cl_maxexp)
		{
			cl_level++;
			classlevels_file_array[1] = cl_level;
			cl_maxexp = ((((b*cl_level) + b)*((b*cl_level) + b)) - (b*b) + 4*a*c)/4*a;
			
			CBaseEntity@ pEntity = g_EntityFuncs.FindEntityByClassname( @pEntity, "trigger_player_class" );
			pEntity.Use(null, null, USE_SET ,0.0);
		}
		
		return; 
	}
