stock LoadObshepit()
{
    new filename[40];
    print("Общепиты:");
    for(new id = 0; id < biz_LoadAmount[0]; id++)
	{
		format(filename, sizeof(filename), "obshepit/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32], Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) ObshepitInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(ObshepitInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(ObshepitInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) ObshepitInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) ObshepitInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) ObshepitInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) ObshepitInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) ObshepitInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Подтип",true)) ObshepitInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) ObshepitInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					//Заявки
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(ObshepitZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  ObshepitZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  ObshepitZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { ObshepitZLevel[id][i] = strval(val); break; }
					//Еда
					format(temp,sizeof(temp),"Еда%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(ObshepitTovarName[id][i],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Еда%dЦена",i);
					if(!strcmp(key,temp,true)) { ObshepitTovarCena[id][i] = strval(val); break; }
				}
				for(new i; i < 3; i++)
				{
					//Напитки
					format(temp,sizeof(temp),"Напиток%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(ObshepitTovarName[id][i+5],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Напиток%dЦена",i);
					if(!strcmp(key,temp,true)) { ObshepitTovarCena[id][i+5] = strval(val); break; }
				}
			}
			if(ObshepitInfo[id][Podtip] == 0)//Бургер
			Create3DTextLabel("/food",COLOR_SPRINGGREEN,376.4947,-67.4346,1002.5078,5.0,id,1);
			else if(ObshepitInfo[id][Podtip] == 1)//Клакин белл
			Create3DTextLabel("/food",COLOR_SPRINGGREEN,370.8856,-6.0175,1002.8589,5.0,id,1);
			else if(ObshepitInfo[id][Podtip] == 2)//Пицца
			Create3DTextLabel("/food",COLOR_SPRINGGREEN,372.7576,-118.8025,1002.4922,5.0,id,1);
			format(key,sizeof(key),"Название: %s Владелец: %s",ObshepitInfo[id][Nazvanie],ObshepitInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
	}
	return 1;
}
stock SaveObshepit(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[0]; id++)
		{
			format(filename,sizeof(filename),"obshepit/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", ObshepitInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", ObshepitInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", ObshepitInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", ObshepitInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", ObshepitInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", ObshepitInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", ObshepitInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", ObshepitInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", ObshepitInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", ObshepitInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,ObshepitZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,ObshepitZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,ObshepitZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,ObshepitZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 5; i++)
				{
					format(var, 32, "Еда%dНазвание=%s\n", i,ObshepitTovarName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Еда%dЦена=%d\n", i,ObshepitTovarCena[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i <3; i++)
				{
					format(var, 32, "Напиток%dНазвание=%s\n", i,ObshepitTovarName[id][i+5]);fwriteRUS(hFile, var);
					format(var, 32, "Напиток%dЦена=%d\n", i,ObshepitTovarCena[id][i+5]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"obshepit/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", ObshepitInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", ObshepitInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", ObshepitInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", ObshepitInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", ObshepitInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", ObshepitInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", ObshepitInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", ObshepitInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", ObshepitInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", ObshepitInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,ObshepitZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,ObshepitZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,ObshepitZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,ObshepitZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 5; i++)
			{
				format(var, 32, "Еда%dНазвание=%s\n", i,ObshepitTovarName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Еда%dЦена=%d\n", i,ObshepitTovarCena[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i <3; i++)
			{
				format(var, 32, "Напиток%dНазвание=%s\n", i,ObshepitTovarName[bizid][i+5]);fwriteRUS(hFile, var);
				format(var, 32, "Напиток%dЦена=%d\n", i,ObshepitTovarCena[bizid][i+5]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadRestoran()
{
    new filename[40];
    print("Рестораны:");
    for(new id = 0; id < biz_LoadAmount[1]; id++)
	{
		format(filename, sizeof(filename), "restoran/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) RestoranInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(RestoranInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(RestoranInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) RestoranInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) RestoranInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) RestoranInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) RestoranInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) RestoranInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) RestoranInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(RestoranZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  RestoranZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  RestoranZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { RestoranZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < 15; i++)
				{
					//Еда
					format(temp,sizeof(temp),"Еда%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(RestoranTovarName[id][i],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Еда%dЦена",i);
					if(!strcmp(key,temp,true)) { RestoranTovarCena[id][i] = strval(val); break; }
				}
				for(new i; i < 10; i++)
				{
					//Напитки
					format(temp,sizeof(temp),"Напиток%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(RestoranTovarName[id][i+15],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Напиток%dЦена",i);
					if(!strcmp(key,temp,true)) { RestoranTovarCena[id][i+15] = strval(val); break; }
				}
			}
			Create3DTextLabel("/restoran",COLOR_SPRINGGREEN,449.4281,-83.6522,999.5547,5.0,id,1);
			format(key,sizeof(key),"Название: %s Владелец: %s",RestoranInfo[id][Nazvanie],RestoranInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveRestoran(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[1]; id++)
		{
			format(filename,sizeof(filename),"restoran/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", RestoranInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", RestoranInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", RestoranInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", RestoranInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", RestoranInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", RestoranInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", RestoranInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", RestoranInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", RestoranInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,RestoranZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,RestoranZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,RestoranZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,RestoranZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 15; i++)
				{
					format(var, 32, "Еда%dНазвание=%s\n", i,RestoranTovarName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Еда%dЦена=%d\n", i,RestoranTovarCena[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i <10; i++)
				{
					format(var, 32, "Напиток%dНазвание=%s\n", i,RestoranTovarName[id][i+15]);fwriteRUS(hFile, var);
					format(var, 32, "Напиток%dЦена=%d\n", i,RestoranTovarCena[id][i+15]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"restoran/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", RestoranInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", RestoranInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", RestoranInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", RestoranInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", RestoranInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", RestoranInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", RestoranInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", RestoranInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", RestoranInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,RestoranZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,RestoranZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,RestoranZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,RestoranZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 15; i++)
			{
				format(var, 32, "Еда%dНазвание=%s\n", i,RestoranTovarName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Еда%dЦена=%d\n", i,RestoranTovarCena[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i <10; i++)
			{
				format(var, 32, "Напиток%dНазвание=%s\n", i,RestoranTovarName[bizid][i+15]);fwriteRUS(hFile, var);
				format(var, 32, "Напиток%dЦена=%d\n", i,RestoranTovarCena[bizid][i+15]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadOfis()
{
    new filename[40];
    print("Офисы:");
    for(new id = 0; id < biz_LoadAmount[2]; id++)
	{
		format(filename, sizeof(filename), "ofis/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) OfisInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(OfisInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(OfisInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) OfisInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) OfisInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) OfisInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) OfisInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) OfisInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Подтип",true)) OfisInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) OfisInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(OfisZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  OfisZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  OfisZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { OfisZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",OfisInfo[id][Nazvanie],OfisInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveOfis(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[2]; id++)
		{
			format(filename,sizeof(filename),"ofis/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", OfisInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", OfisInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", OfisInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", OfisInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", OfisInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", OfisInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", OfisInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", OfisInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", OfisInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", OfisInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,OfisZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,OfisZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,OfisZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,OfisZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"ofis/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", OfisInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", OfisInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", OfisInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", OfisInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", OfisInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", OfisInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", OfisInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", OfisInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", OfisInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", OfisInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,OfisZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,OfisZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,OfisZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,OfisZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadSklad()
{
    new filename[40];
    print("Склады:");
    for(new id = 0; id < biz_LoadAmount[3]; id++)
	{
		format(filename, sizeof(filename), "sklad/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) SkladInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(SkladInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(SkladInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) SkladInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) SkladInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) SkladInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) SkladInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) SkladInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) SkladInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(SkladZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  SkladZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  SkladZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { SkladZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",SkladInfo[id][Nazvanie],SkladInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveSklad(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[3]; id++)
		{
			format(filename,sizeof(filename),"sklad/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", SkladInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", SkladInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", SkladInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", SkladInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", SkladInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", SkladInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", SkladInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", SkladInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", SkladInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,SkladZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,SkladZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,SkladZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,SkladZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"sklad/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", SkladInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", SkladInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", SkladInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", SkladInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", SkladInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", SkladInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", SkladInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", SkladInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", SkladInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,SkladZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,SkladZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,SkladZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,SkladZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadSportzal()
{
    new filename[40];
    print("Спортзалы:");
    for(new id = 0; id < biz_LoadAmount[4]; id++)
	{
		format(filename, sizeof(filename), "sportzal/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) SportzalInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(SportzalInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(SportzalInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) SportzalInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) SportzalInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) SportzalInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) SportzalInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) SportzalInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"ЦенаЗаВход",true)) SportzalInfo[id][CenaZaVhod] = strval(val);
				else if(!strcmp(key,"Подтип",true)) SportzalInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) SportzalInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(SportzalZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  SportzalZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  SportzalZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { SportzalZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",SportzalInfo[id][Nazvanie],SportzalInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveSportzal(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[4]; id++)
		{
			format(filename,sizeof(filename),"sportzal/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", SportzalInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", SportzalInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", SportzalInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", SportzalInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", SportzalInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", SportzalInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", SportzalInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", SportzalInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "ЦенаЗаВход=%d\n", SportzalInfo[id][CenaZaVhod]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", SportzalInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", SportzalInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,SportzalZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,SportzalZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,SportzalZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,SportzalZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"sportzal/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", SportzalInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", SportzalInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", SportzalInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", SportzalInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", SportzalInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", SportzalInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", SportzalInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", SportzalInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "ЦенаЗаВход=%d\n", SportzalInfo[bizid][CenaZaVhod]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", SportzalInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", SportzalInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,SportzalZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,SportzalZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,SportzalZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,SportzalZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadShinomontaj()
{
    new filename[40];
    print("Шиномонтажки:");
    for(new id = 0; id < biz_LoadAmount[5]; id++)
	{
		format(filename, sizeof(filename), "shinomontaj/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) ShinomontajInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(ShinomontajInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(ShinomontajInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) ShinomontajInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) ShinomontajInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) ShinomontajInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) ShinomontajInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) ShinomontajInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) ShinomontajInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					//Заявки
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(ShinomontajZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  ShinomontajZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  ShinomontajZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { ShinomontajZLevel[id][i] = strval(val); break; }
					//Услуги
					format(temp,sizeof(temp),"Замок%dЦена",i+1);
					if(!strcmp(key,temp,true)) { ShinomontajCena[id][i] = strval(val);  break; }
					format(temp,sizeof(temp),"Иммобилайзер%dЦена",i+1);
					if(!strcmp(key,temp,true)) { ShinomontajCena[id][i+5] = strval(val);  break; }
				}
				for(new i; i < 3; i++)
				{
					format(temp,sizeof(temp),"Сигнализация%dЦена",i+1);
					if(!strcmp(key,temp,true)) { ShinomontajCena[id][i+10] = strval(val);  break; }
					
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",ShinomontajInfo[id][Nazvanie],ShinomontajInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveShinomontaj(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[5]; id++)
		{
			format(filename,sizeof(filename),"shinomontaj/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", ShinomontajInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", ShinomontajInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", ShinomontajInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", ShinomontajInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", ShinomontajInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", ShinomontajInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", ShinomontajInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", ShinomontajInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", ShinomontajInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,ShinomontajZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,ShinomontajZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,ShinomontajZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,ShinomontajZLevel[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Замок%dЦена=%d\n", i+1,ShinomontajCena[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Иммобилайзер%dЦена=%d\n", i+1,ShinomontajCena[id][i+5]);fwriteRUS(hFile, var);
				}
				for(new i; i < 3; i++)
				format(var, 32, "Сигнализация%dЦена=%d\n", i+1,ShinomontajCena[id][i+10]);fwriteRUS(hFile, var);
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"shinomontaj/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", ShinomontajInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", ShinomontajInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", ShinomontajInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", ShinomontajInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", ShinomontajInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", ShinomontajInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", ShinomontajInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", ShinomontajInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", ShinomontajInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,ShinomontajZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,ShinomontajZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,ShinomontajZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,ShinomontajZLevel[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Замок%dЦена=%d\n", i+1,ShinomontajCena[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Иммобилайзер%dЦена=%d\n", i+1,ShinomontajCena[bizid][i+5]);fwriteRUS(hFile, var);
			}
			for(new i; i < 3; i++)
			format(var, 32, "Сигнализация%dЦена=%d\n", i+1,ShinomontajCena[bizid][i+10]);fwriteRUS(hFile, var);
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadKlub()
{
    new filename[40];
    print("Клубы:");
    for(new id = 0; id < biz_LoadAmount[6]; id++)
	{
		format(filename, sizeof(filename), "klub/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) KlubInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(KlubInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(KlubInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) KlubInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) KlubInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) KlubInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) KlubInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) KlubInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"ЦенаЗаВход",true)) KlubInfo[id][CenaZaVhod] = strval(val);
				else if(!strcmp(key,"Деньги",true)) KlubInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(KlubZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  KlubZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  KlubZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { KlubZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < 5; i++)
				{
					//Еда
					format(temp,sizeof(temp),"Еда%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(KlubTovarName[id][i],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Еда%dЦена",i);
					if(!strcmp(key,temp,true)) { KlubTovarCena[id][i] = strval(val); break; }
				}
				for(new i; i < 10; i++)
				{
					//Напитки
					format(temp,sizeof(temp),"Напиток%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(KlubTovarName[id][i+5],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Напиток%dЦена",i);
					if(!strcmp(key,temp,true)) { KlubTovarCena[id][i+5] = strval(val); break; }
				}
			}
			Create3DTextLabel("/club",COLOR_SPRINGGREEN,499.6631,-18.7522,1001.6719,5.0,id,1);
			format(key,sizeof(key),"Название: %s Владелец: %s",KlubInfo[id][Nazvanie],KlubInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveKlub(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[6]; id++)
		{
			format(filename,sizeof(filename),"klub/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", KlubInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", KlubInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", KlubInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", KlubInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", KlubInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", KlubInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", KlubInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", KlubInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "ЦенаЗаВход=%d\n", KlubInfo[id][CenaZaVhod]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", KlubInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,KlubZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,KlubZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,KlubZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,KlubZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 5; i++)
				{
					format(var, 32, "Еда%dНазвание=%s\n", i,KlubTovarName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Еда%dЦена=%d\n", i,KlubTovarCena[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i <10; i++)
				{
					format(var, 32, "Напиток%dНазвание=%s\n", i,KlubTovarName[id][i+5]);fwriteRUS(hFile, var);
					format(var, 32, "Напиток%dЦена=%d\n", i,KlubTovarCena[id][i+5]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"klub/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", KlubInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", KlubInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", KlubInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", KlubInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", KlubInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", KlubInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", KlubInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", KlubInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "ЦенаЗаВход=%d\n", KlubInfo[bizid][CenaZaVhod]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", KlubInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,KlubZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,KlubZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,KlubZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,KlubZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 5; i++)
			{
				format(var, 32, "Еда%dНазвание=%s\n", i,KlubTovarName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Еда%dЦена=%d\n", i,KlubTovarCena[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i <10; i++)
			{
				format(var, 32, "Напиток%dНазвание=%s\n", i,KlubTovarName[bizid][i+5]);fwriteRUS(hFile, var);
				format(var, 32, "Напиток%dЦена=%d\n", i,KlubTovarCena[bizid][i+5]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadMagazin()
{
    new filename[40];
    print("Магазины 24-7:");
    for(new id = 0; id < biz_LoadAmount[7]; id++)
	{
		format(filename, sizeof(filename), "magazin/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) MagazinInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(MagazinInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(MagazinInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) MagazinInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) MagazinInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) MagazinInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) MagazinInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) MagazinInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Подтип",true)) MagazinInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) MagazinInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(MagazinZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  MagazinZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  MagazinZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { MagazinZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < MagazinItems; i++)
				{
					format(temp,sizeof(temp),"Цена%s",MagazMenuNamesRU[i]);
					if(!strcmp(key,temp,true)) { MagazinTovarCena[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",MagazinInfo[id][Nazvanie],MagazinInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveMagazin(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[7]; id++)
		{
			format(filename,sizeof(filename),"magazin/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", MagazinInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", MagazinInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", MagazinInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", MagazinInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", MagazinInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", MagazinInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", MagazinInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", MagazinInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", MagazinInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", MagazinInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,MagazinZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,MagazinZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,MagazinZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,MagazinZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < MagazinItems; i++)
				{
					format(var, 32, "Цена%s=%d\n", MagazMenuNamesRU[i],MagazinTovarCena[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"magazin/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", MagazinInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", MagazinInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", MagazinInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", MagazinInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", MagazinInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", MagazinInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", MagazinInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", MagazinInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", MagazinInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", MagazinInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,MagazinZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,MagazinZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,MagazinZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,MagazinZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < MagazinItems; i++)
			{
				format(var, 32, "Цена%s=%d\n", MagazMenuNamesRU[i],MagazinTovarCena[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadZapravka()
{
    new filename[40];
    print("Заправки:");
    for(new id = 0; id < biz_LoadAmount[8]; id++)
	{
		format(filename, sizeof(filename), "zapravka/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) ZapravkaInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(ZapravkaInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(ZapravkaInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) ZapravkaInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) ZapravkaInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) ZapravkaInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) ZapravkaInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) ZapravkaInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) ZapravkaInfo[id][Bank] = strval(val);
				else if(!strcmp(key,"Дизель",true)) ZapravkaBenz[id][0] = strval(val);
				else if(!strcmp(key,"АИ-80",true)) ZapravkaBenz[id][1] = strval(val);
				else if(!strcmp(key,"АИ-92",true)) ZapravkaBenz[id][2] = strval(val);
				else if(!strcmp(key,"АИ-95",true)) ZapravkaBenz[id][3] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(ZapravkaZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  ZapravkaZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  ZapravkaZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { ZapravkaZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",ZapravkaInfo[id][Nazvanie],ZapravkaInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveZapravka(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[8]; id++)
		{
			format(filename,sizeof(filename),"zapravka/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", ZapravkaInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", ZapravkaInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", ZapravkaInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", ZapravkaInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", ZapravkaInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", ZapravkaInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", ZapravkaInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", ZapravkaInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", ZapravkaInfo[id][Bank]);fwriteRUS(hFile, var);
				format(var, 32, "Дизель=%d\n", ZapravkaBenz[id][0]);fwriteRUS(hFile, var);
				format(var, 32, "АИ-80=%d\n", ZapravkaBenz[id][1]);fwriteRUS(hFile, var);
				format(var, 32, "АИ-92=%d\n", ZapravkaBenz[id][2]);fwriteRUS(hFile, var);
				format(var, 32, "АИ-95=%d\n", ZapravkaBenz[id][3]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,ZapravkaZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,ZapravkaZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,ZapravkaZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,ZapravkaZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"zapravka/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", ZapravkaInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", ZapravkaInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", ZapravkaInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", ZapravkaInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", ZapravkaInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", ZapravkaInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", ZapravkaInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", ZapravkaInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", ZapravkaInfo[bizid][Bank]);fwriteRUS(hFile, var);
			format(var, 32, "Дизель=%d\n", ZapravkaBenz[bizid][0]);fwriteRUS(hFile, var);
			format(var, 32, "АИ-80=%d\n", ZapravkaBenz[bizid][1]);fwriteRUS(hFile, var);
			format(var, 32, "АИ-92=%d\n", ZapravkaBenz[bizid][2]);fwriteRUS(hFile, var);
			format(var, 32, "АИ-95=%d\n", ZapravkaBenz[bizid][3]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,ZapravkaZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,ZapravkaZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,ZapravkaZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,ZapravkaZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadAmmunacia()
{
    new filename[40];
    print("Аммунации:");
    for(new id = 0; id < biz_LoadAmount[9]; id++)
	{
		format(filename, sizeof(filename), "ammunacia/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) AmmunaciaInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(AmmunaciaInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(AmmunaciaInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) AmmunaciaInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) AmmunaciaInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) AmmunaciaInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) AmmunaciaInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) AmmunaciaInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Подтип",true)) AmmunaciaInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) AmmunaciaInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(AmmunaciaZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  AmmunaciaZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  AmmunaciaZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { AmmunaciaZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < 11; i++)
				{
					format(temp,sizeof(temp),"Оружие%dЦена",i);
					if(!strcmp(key,temp,true)) {  AmmunaciaWeaponPrice[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Патроны%dЦена",i);
					if(!strcmp(key,temp,true)) {  AmmunaciaAmmoPrice[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",AmmunaciaInfo[id][Nazvanie],AmmunaciaInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveAmmunacia(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[9]; id++)
		{
			format(filename,sizeof(filename),"ammunacia/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", AmmunaciaInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", AmmunaciaInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", AmmunaciaInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", AmmunaciaInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", AmmunaciaInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", AmmunaciaInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", AmmunaciaInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", AmmunaciaInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", AmmunaciaInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", AmmunaciaInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,AmmunaciaZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,AmmunaciaZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,AmmunaciaZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,AmmunaciaZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 11; i++)
				{
					format(var, 32, "Оружие%dЦена=%d\n", i,AmmunaciaWeaponPrice[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Патроны%dЦена=%d\n", i,AmmunaciaAmmoPrice[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"ammunacia/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", AmmunaciaInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", AmmunaciaInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", AmmunaciaInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", AmmunaciaInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", AmmunaciaInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", AmmunaciaInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", AmmunaciaInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", AmmunaciaInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", AmmunaciaInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", AmmunaciaInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,AmmunaciaZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,AmmunaciaZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,AmmunaciaZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,AmmunaciaZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 11; i++)
			{
				format(var, 32, "Оружие%dЦена=%d\n", i,AmmunaciaWeaponPrice[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Патроны%dЦена=%d\n", i,AmmunaciaAmmoPrice[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadBar()
{
    new filename[40];
    print("Бары:");
    for(new id = 0; id < biz_LoadAmount[10]; id++)
	{
		format(filename, sizeof(filename), "bar/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) BarInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(BarInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(BarInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) BarInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) BarInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) BarInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) BarInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) BarInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"ЦенаЗаВход",true)) BarInfo[id][CenaZaVhod] = strval(val);
				else if(!strcmp(key,"Подтип",true)) BarInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) BarInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(BarZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  BarZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  BarZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { BarZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < 5; i++)
				{
					//Еда
					format(temp,sizeof(temp),"Еда%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(BarTovarName[id][i],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Еда%dЦена",i);
					if(!strcmp(key,temp,true)) { BarTovarCena[id][i] = strval(val); break; }
				}
				for(new i; i < 10; i++)
				{
					//Напитки
					format(temp,sizeof(temp),"Напиток%dНазвание",i);
					if(!strcmp(key,temp,true)) { strmid(BarTovarName[id][i+5],val,0,strlen(val)-1,16); break; }
					format(temp,sizeof(temp),"Напиток%dЦена",i);
					if(!strcmp(key,temp,true)) { BarTovarCena[id][i+5] = strval(val); break; }
				}
			}
			switch(BarInfo[id][Podtip])
			{
				case 0:Create3DTextLabel("/bar",COLOR_SPRINGGREEN,1207.2396,-30.7883,1001.9531,5.0,id,1);
				case 1:Create3DTextLabel("/bar",COLOR_SPRINGGREEN,-224.7822,1407.4834,28.7734,5.0,id,1);
				case 2:Create3DTextLabel("/bar",COLOR_SPRINGGREEN,498.3150,-76.0331,999.7578,5.0,id,1);
			}
			
			format(key,sizeof(key),"Название: %s Владелец: %s",BarInfo[id][Nazvanie],BarInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveBar(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[10]; id++)
		{
			format(filename,sizeof(filename),"bar/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", BarInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", BarInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", BarInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", BarInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", BarInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", BarInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", BarInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", BarInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "ЦенаЗаВход=%d\n", BarInfo[id][CenaZaVhod]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", BarInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", BarInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,BarZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,BarZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,BarZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,BarZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 5; i++)
				{
					format(var, 32, "Еда%dНазвание=%s\n", i,BarTovarName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Еда%dЦена=%d\n", i,BarTovarCena[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i <10; i++)
				{
					format(var, 32, "Напиток%dНазвание=%s\n", i,BarTovarName[id][i+5]);fwriteRUS(hFile, var);
					format(var, 32, "Напиток%dЦена=%d\n", i,BarTovarCena[id][i+5]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"bar/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", BarInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", BarInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", BarInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", BarInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", BarInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", BarInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", BarInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", BarInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "ЦенаЗаВход=%d\n", BarInfo[bizid][CenaZaVhod]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", BarInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", BarInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,BarZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,BarZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,BarZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,BarZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 5; i++)
			{
				format(var, 32, "Еда%dНазвание=%s\n", i,BarTovarName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Еда%dЦена=%d\n", i,BarTovarCena[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i <10; i++)
			{
				format(var, 32, "Напиток%dНазвание=%s\n", i,BarTovarName[bizid][i+5]);fwriteRUS(hFile, var);
				format(var, 32, "Напиток%dЦена=%d\n", i,BarTovarCena[bizid][i+5]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadAvtosalon()
{
    new filename[40];
    print("Автосалоны:");
    for(new id = 0; id < biz_LoadAmount[12]; id++)
	{
		format(filename, sizeof(filename), "avtosalon/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) AvtosalonInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(AvtosalonInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(AvtosalonInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) AvtosalonInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) AvtosalonInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) AvtosalonInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) AvtosalonInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) AvtosalonInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) AvtosalonInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(AvtosalonZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  AvtosalonZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  AvtosalonZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { AvtosalonZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",AvtosalonInfo[id][Nazvanie],AvtosalonInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveAvtosalon(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[12]; id++)
		{
			format(filename,sizeof(filename),"avtosalon/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", AvtosalonInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", AvtosalonInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", AvtosalonInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", AvtosalonInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", AvtosalonInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", AvtosalonInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", AvtosalonInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", AvtosalonInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", AvtosalonInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,AvtosalonZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,AvtosalonZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,AvtosalonZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,AvtosalonZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"avtosalon/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", AvtosalonInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", AvtosalonInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", AvtosalonInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", AvtosalonInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", AvtosalonInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", AvtosalonInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", AvtosalonInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", AvtosalonInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", AvtosalonInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,AvtosalonZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,AvtosalonZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,AvtosalonZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,AvtosalonZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadOdejda()
{
    new filename[40];
    print("Магазины одежды:");
    for(new id = 0; id < biz_LoadAmount[13]; id++)
	{
		format(filename, sizeof(filename), "odejda/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) OdejdaInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(OdejdaInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(OdejdaInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) OdejdaInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) OdejdaInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) OdejdaInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) OdejdaInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) OdejdaInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Подтип",true)) OdejdaInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Деньги",true)) OdejdaInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(OdejdaZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  OdejdaZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  OdejdaZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { OdejdaZLevel[id][i] = strval(val); break; }
				}
				//Цены на одежду для мужчин
				for(new s; s < sizeof(SportMSkins); s++)
				{
					for(new i; i < sizeof(SportMSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"МужРаса%dСпорт%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaMSportPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(ClassicMSkins); s++)
				{
					for(new i; i < sizeof(ClassicMSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"МужРаса%dКлассика%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaMClassicPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(CommonMSkins); s++)
				{
					for(new i; i < sizeof(CommonMSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"МужРаса%dОбычный%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaMCommonPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(RestMSkins); s++)
				{
					for(new i; i < sizeof(RestMSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"МужРаса%dОтдых%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaMRestPrice[id][s][i] = strval(val); break; }
					}
				}
				//Цены на одежду для женщин
				for(new s; s < sizeof(SportFSkins); s++)
				{
					for(new i; i < sizeof(SportFSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"ЖенРаса%dСпорт%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaFSportPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(ClassicFSkins); s++)
				{
					for(new i; i < sizeof(ClassicFSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"ЖенРаса%dКлассика%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaFClassicPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(CommonFSkins); s++)
				{
					for(new i; i < sizeof(CommonFSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"ЖенРаса%dОбычный%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaFCommonPrice[id][s][i] = strval(val); break; }
					}
				}
				for(new s; s < sizeof(RestFSkins); s++)
				{
					for(new i; i < sizeof(RestFSkins[]); i++)
					{
						new temp[32];
						format(temp,sizeof(temp),"ЖенРаса%dОтдых%d",s,i);
						if(!strcmp(key,temp,true)) { OdejdaFRestPrice[id][s][i] = strval(val); break; }
					}
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",OdejdaInfo[id][Nazvanie],OdejdaInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveOdejda(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[13]; id++)
		{
			format(filename,sizeof(filename),"odejda/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", OdejdaInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", OdejdaInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", OdejdaInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", OdejdaInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", OdejdaInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", OdejdaInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", OdejdaInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", OdejdaInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", OdejdaInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", OdejdaInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,OdejdaZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,OdejdaZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,OdejdaZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,OdejdaZLevel[id][i]);fwriteRUS(hFile, var);
				}
				//Цены на одежду для мужчин
				for(new s; s < sizeof(SportMSkins); s++)
				{
					for(new i; i < sizeof(SportMSkins[]); i++)
					{
						format(var, 32, "МужРаса%dСпорт%d=%d\n", s,i,OdejdaMSportPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(ClassicMSkins); s++)
				{
					for(new i; i < sizeof(ClassicMSkins[]); i++)
					{
						format(var, 32, "МужРаса%dКлассика%d=%d\n", s,i,OdejdaMClassicPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(CommonMSkins); s++)
				{
					for(new i; i < sizeof(CommonMSkins[]); i++)
					{
						format(var, 32, "МужРаса%dОбычный%d=%d\n", s,i,OdejdaMCommonPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(RestMSkins); s++)
				{
					for(new i; i < sizeof(RestMSkins[]); i++)
					{
						format(var, 32, "МужРаса%dОтдых%d=%d\n", s,i,OdejdaMRestPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				//Цены на одежду для женщин
				for(new s; s < sizeof(SportFSkins); s++)
				{
					for(new i; i < sizeof(SportFSkins[]); i++)
					{
						format(var, 32, "ЖенРаса%dСпорт%d=%d\n", s,i,OdejdaFSportPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(ClassicFSkins); s++)
				{
					for(new i; i < sizeof(ClassicFSkins[]); i++)
					{
						format(var, 32, "ЖенРаса%dКлассика%d=%d\n", s,i,OdejdaFClassicPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(CommonFSkins); s++)
				{
					for(new i; i < sizeof(CommonFSkins[]); i++)
					{
						format(var, 32, "ЖенРаса%dОбычный%d=%d\n", s,i,OdejdaFCommonPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				for(new s; s < sizeof(RestFSkins); s++)
				{
					for(new i; i < sizeof(RestFSkins[]); i++)
					{
						format(var, 32, "ЖенРаса%dОбычный%d=%d\n", s,i,OdejdaFRestPrice[id][s][i]);fwriteRUS(hFile, var);
					}
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"odejda/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", OdejdaInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", OdejdaInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", OdejdaInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", OdejdaInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", OdejdaInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", OdejdaInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", OdejdaInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", OdejdaInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", OdejdaInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", OdejdaInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,OdejdaZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,OdejdaZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,OdejdaZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,OdejdaZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			//Цены на одежду для мужчин
			for(new s; s < sizeof(SportMSkins); s++)
			{
				for(new i; i < sizeof(SportMSkins[]); i++)
				{
					format(var, 32, "МужРаса%dСпорт%d=%d\n", s,i,OdejdaMSportPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(ClassicMSkins); s++)
			{
				for(new i; i < sizeof(ClassicMSkins[]); i++)
				{
					format(var, 32, "МужРаса%dКлассика%d=%d\n", s,i,OdejdaMClassicPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(CommonMSkins); s++)
			{
				for(new i; i < sizeof(CommonMSkins[]); i++)
				{
					format(var, 32, "МужРаса%dОбычный%d=%d\n", s,i,OdejdaMCommonPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(RestMSkins); s++)
			{
				for(new i; i < sizeof(RestMSkins[]); i++)
				{
					format(var, 32, "МужРаса%dОтдых%d=%d\n", s,i,OdejdaMRestPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			//Цены на одежду для женщин
			for(new s; s < sizeof(SportFSkins); s++)
			{
				for(new i; i < sizeof(SportFSkins[]); i++)
				{
					format(var, 32, "ЖенРаса%dСпорт%d=%d\n", s,i,OdejdaFSportPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(ClassicFSkins); s++)
			{
				for(new i; i < sizeof(ClassicFSkins[]); i++)
				{
					format(var, 32, "ЖенРаса%dКлассика%d=%d\n", s,i,OdejdaFClassicPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(CommonFSkins); s++)
			{
				for(new i; i < sizeof(CommonFSkins[]); i++)
				{
					format(var, 32, "ЖенРаса%dОбычный%d=%d\n", s,i,OdejdaFCommonPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			for(new s; s < sizeof(RestFSkins); s++)
			{
				for(new i; i < sizeof(RestFSkins[]); i++)
				{
					format(var, 32, "ЖенРаса%dОбычный%d=%d\n", s,i,OdejdaFRestPrice[bizid][s][i]);fwriteRUS(hFile, var);
				}
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadVehRent()
{
    new filename[40];
    print("Аренда транспорта:");
    for(new id = 0; id < biz_LoadAmount[14]; id++)
	{
		format(filename, sizeof(filename), "arenda/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) VehRentInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(VehRentInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(VehRentInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) VehRentInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) VehRentInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) VehRentInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) VehRentInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) VehRentInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) VehRentInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					new temp[32];
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(VehRentZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  VehRentZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  VehRentZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { VehRentZLevel[id][i] = strval(val); break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",VehRentInfo[id][Nazvanie],VehRentInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
		
	}
	return 1;
}
stock SaveVehRent(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[14]; id++)
		{
			format(filename,sizeof(filename),"arenda/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", VehRentInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", VehRentInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", VehRentInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", VehRentInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", VehRentInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", VehRentInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", VehRentInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", VehRentInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", VehRentInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,VehRentZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,VehRentZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,VehRentZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,VehRentZLevel[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"arenda/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", VehRentInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", VehRentInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", VehRentInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", VehRentInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", VehRentInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", VehRentInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", VehRentInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", VehRentInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", VehRentInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,VehRentZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,VehRentZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,VehRentZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,VehRentZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock LoadMebelSalon()
{
    new filename[40];
    print("Мебельные салоны:");
    for(new id; id < biz_LoadAmount[11]; id++)
	{
		format(filename, sizeof(filename), "mebel/ID%d.ini",id);
		new File: StuffFile = fopen(filename, io_read);
		if (StuffFile)
		{
		    new key[ 256] , val[ 256], temp[32];
		    new Data[ 128];
		    while ( fread( StuffFile , Data , sizeof( Data ) ) )
			{
				key = ini_GetKey( Data );
				val = ini_GetValue( Data );
				if(!strcmp(key,"Открыто",true)) MebelSalonInfo[id][Otkrut] = strval(val);
				else if(!strcmp(key,"Подтип",true)) MebelSalonInfo[id][Podtip] = strval(val);
				else if(!strcmp(key,"Название",true)) strmid(MebelSalonInfo[id][Nazvanie],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Владелец",true)) strmid(MebelSalonInfo[id][Vladelec],val,0,strlen(val)-1,32);
				else if(!strcmp(key,"Продается",true)) MebelSalonInfo[id][Prodaetsya] = strval(val);
				else if(!strcmp(key,"Поз_x",true)) MebelSalonInfo[id][Biz_x] = floatstr(val);
				else if(!strcmp(key,"Поз_y",true)) MebelSalonInfo[id][Biz_y] = floatstr(val);
				else if(!strcmp(key,"Поз_z",true)) MebelSalonInfo[id][Biz_z] = floatstr(val);
				else if(!strcmp(key,"Цена",true)) MebelSalonInfo[id][Cena] = strval(val);
				else if(!strcmp(key,"Деньги",true)) MebelSalonInfo[id][Bank] = strval(val);
				for(new i; i < 5; i++)
				{
					format(temp,sizeof(temp),"Заявка%dИмя",i);
					if(!strcmp(key,temp,true)) { strmid(MebelZName[id][i],val,0,strlen(val)-1,MAX_PLAYER_NAME);  break; }
					format(temp,sizeof(temp),"Заявка%dТелефон",i);
					if(!strcmp(key,temp,true)) {  MebelZPhone[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dВозраст",i);
					if(!strcmp(key,temp,true)) {  MebelZVozrast[id][i] = strval(val); break; }
					format(temp,sizeof(temp),"Заявка%dУровень",i);
					if(!strcmp(key,temp,true)) { MebelZLevel[id][i] = strval(val); break; }
				}
				for(new i; i < 30; i++)
				{
					format(temp,sizeof(temp),"МебельНомер%d",i);
					if(!strcmp(key,temp,true)) { MebelSalonObjectsID[id][i] = strval(val);  break; }
					format(temp,sizeof(temp),"ЦенаНомер%d",i);
					if(!strcmp(key,temp,true)) { MebelSalonObjectsPrice[id][i] = strval(val);  break; }
				}
			}
			format(key,sizeof(key),"Название: %s Владелец: %s",MebelSalonInfo[id][Nazvanie],MebelSalonInfo[id][Vladelec]);
			print(key);
	        fclose(StuffFile);
		}
	}
	return 1;
}
stock SaveMebelSalon(bizid)
{
	new filename[64];
	new var[32];
	if(bizid == -1)
	{
		for(new id = 0; id < biz_LoadAmount[11]; id++)
		{
			format(filename,sizeof(filename),"mebel/ID%d.ini",id);
			new File: hFile = fopen(filename, io_write);
			if(hFile)
			{
				
				format(var, 32, "Открыто=%d\n", MebelSalonInfo[id][Otkrut]);fwriteRUS(hFile, var);
				format(var, 32, "Подтип=%d\n", MebelSalonInfo[id][Podtip]);fwriteRUS(hFile, var);
				format(var, 32, "Название=%s\n", MebelSalonInfo[id][Nazvanie]);fwriteRUS(hFile, var);
				format(var, 32, "Владелец=%s\n", MebelSalonInfo[id][Vladelec]);fwriteRUS(hFile, var);
				format(var, 32, "Продается=%d\n", MebelSalonInfo[id][Prodaetsya]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_x=%f\n", MebelSalonInfo[id][Biz_x]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_y=%f\n", MebelSalonInfo[id][Biz_y]);fwriteRUS(hFile, var);
				format(var, 32, "Поз_z=%f\n", MebelSalonInfo[id][Biz_z]);fwriteRUS(hFile, var);
				format(var, 32, "Цена=%d\n", MebelSalonInfo[id][Cena]);fwriteRUS(hFile, var);
				format(var, 32, "Деньги=%d\n", MebelSalonInfo[id][Bank]);fwriteRUS(hFile, var);
				for(new i; i < 5; i++)
				{
					format(var, 32, "Заявка%dИмя=%s\n", i,MebelZName[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dТелефон=%d\n", i,MebelZPhone[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dВозраст=%d\n", i,MebelZVozrast[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "Заявка%dУровень=%d\n", i,MebelZLevel[id][i]);fwriteRUS(hFile, var);
				}
				for(new i; i < 30; i++)
				{
					format(var, 32, "МебельНомер%d=%d\n", i,MebelSalonObjectsID[id][i]);fwriteRUS(hFile, var);
					format(var, 32, "ЦенаНомер%d=%d\n", i,MebelSalonObjectsPrice[id][i]);fwriteRUS(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
	else
	{
     	format(filename,sizeof(filename),"mebel/ID%d.ini",bizid);
		new File: hFile = fopen(filename, io_write);
		if(hFile)
		{
			format(var, 32, "Открыто=%d\n", MebelSalonInfo[bizid][Otkrut]);fwriteRUS(hFile, var);
			format(var, 32, "Подтип=%d\n", MebelSalonInfo[bizid][Podtip]);fwriteRUS(hFile, var);
			format(var, 32, "Название=%s\n", MebelSalonInfo[bizid][Nazvanie]);fwriteRUS(hFile, var);
			format(var, 32, "Владелец=%s\n", MebelSalonInfo[bizid][Vladelec]);fwriteRUS(hFile, var);
			format(var, 32, "Продается=%d\n", MebelSalonInfo[bizid][Prodaetsya]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_x=%f\n", MebelSalonInfo[bizid][Biz_x]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_y=%f\n", MebelSalonInfo[bizid][Biz_y]);fwriteRUS(hFile, var);
			format(var, 32, "Поз_z=%f\n", MebelSalonInfo[bizid][Biz_z]);fwriteRUS(hFile, var);
			format(var, 32, "Цена=%d\n", MebelSalonInfo[bizid][Cena]);fwriteRUS(hFile, var);
			format(var, 32, "Деньги=%d\n", MebelSalonInfo[bizid][Bank]);fwriteRUS(hFile, var);
			for(new i; i < 5; i++)
			{
				format(var, 32, "Заявка%dИмя=%s\n", i,MebelZName[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dТелефон=%d\n", i,MebelZPhone[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dВозраст=%d\n", i,MebelZVozrast[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "Заявка%dУровень=%d\n", i,MebelZLevel[bizid][i]);fwriteRUS(hFile, var);
			}
			for(new i; i < 30; i++)
			{
				format(var, 32, "МебельНомер%d=%d\n", i,MebelSalonObjectsID[bizid][i]);fwriteRUS(hFile, var);
				format(var, 32, "ЦенаНомер%d=%d\n", i,MebelSalonObjectsPrice[bizid][i]);fwriteRUS(hFile, var);
			}
			fclose(hFile);
		}
	}
	return 1;
}
stock PlayerNearBiz(playerid,&id,&type)
{
	for(new i; i < biz_LoadAmount[0]; i++)//Общепит
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,ObshepitInfo[i][Biz_x],ObshepitInfo[i][Biz_y],ObshepitInfo[i][Biz_z]))
		{
			id = i;
			type = 0;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[1]; i++)//Ресторан
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,RestoranInfo[i][Biz_x],RestoranInfo[i][Biz_y],RestoranInfo[i][Biz_z]))
		{
			id = i;
			type = 1;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[2]; i++)//Офис
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,OfisInfo[i][Biz_x],OfisInfo[i][Biz_y],OfisInfo[i][Biz_z]))
		{
			id = i;
			type = 2;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[3]; i++)//Склад
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,SkladInfo[i][Biz_x],SkladInfo[i][Biz_y],SkladInfo[i][Biz_z]))
		{
			id = i;
			type = 3;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[4]; i++)//Спортзал
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,SportzalInfo[i][Biz_x],SportzalInfo[i][Biz_y],SportzalInfo[i][Biz_z]))
		{
			id = i;
			type = 4;
			return 1;
		}
	}
    for(new i; i < biz_LoadAmount[5]; i++)//Шиномонтаж
	{
	   if(IsPlayerInRangeOfPoint(playerid,2.0,ShinomontajInfo[i][Biz_x],ShinomontajInfo[i][Biz_y],ShinomontajInfo[i][Biz_z]))
		{
			id = i;
			type = 5;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[6]; i++)//Клуб
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,KlubInfo[i][Biz_x],KlubInfo[i][Biz_y],KlubInfo[i][Biz_z]))
		{
			id = i;
			type = 6;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[7]; i++)//Магазин
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,MagazinInfo[i][Biz_x],MagazinInfo[i][Biz_y],MagazinInfo[i][Biz_z]))
		{
			id = i;
			type = 7;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[8]; i++)//Заправка
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,ZapravkaInfo[i][Biz_x],ZapravkaInfo[i][Biz_y],ZapravkaInfo[i][Biz_z]))
		{
			id = i;
			type = 8;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[9]; i++)//Аммунация
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,AmmunaciaInfo[i][Biz_x],AmmunaciaInfo[i][Biz_y],AmmunaciaInfo[i][Biz_z]))
		{
			id = i;
			type = 9;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[10]; i++)//Бар
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,BarInfo[i][Biz_x],BarInfo[i][Biz_y],BarInfo[i][Biz_z]))
		{
			id = i;
			type = 10;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[11]; i++)//Мебельный салон
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,MebelSalonInfo[i][Biz_x],MebelSalonInfo[i][Biz_y],MebelSalonInfo[i][Biz_z]))
		{
			id = i;
			type = 11;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[12]; i++)//Автосалон
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,AvtosalonInfo[i][Biz_x],AvtosalonInfo[i][Biz_y],AvtosalonInfo[i][Biz_z]))
		{
			id = i;
			type = 12;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[13]; i++)//Одежда
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,OdejdaInfo[i][Biz_x],OdejdaInfo[i][Biz_y],OdejdaInfo[i][Biz_z]))
		{
			id = i;
			type = 13;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[14]; i++)//Аренда
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,VehRentInfo[i][Biz_x],VehRentInfo[i][Biz_y],VehRentInfo[i][Biz_z]))
		{
			id = i;
			type = 14;
			return 1;
		}
	}
	id = -1;
	type = -1;
	return -1;
}
stock PlayerNearOwnBiz(playerid,&id,&type)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	for(new i; i < biz_LoadAmount[0]; i++)//Общепит
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,ObshepitInfo[i][Biz_x],ObshepitInfo[i][Biz_y],ObshepitInfo[i][Biz_z]) && !strcmp(name,ObshepitInfo[i][Vladelec],true))
		{
			id = i;
			type = 0;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[1]; i++)//Ресторан
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,RestoranInfo[i][Biz_x],RestoranInfo[i][Biz_y],RestoranInfo[i][Biz_z]) && !strcmp(name,RestoranInfo[i][Vladelec],true))
		{
			id = i;
			type = 1;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[2]; i++)//Офис
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,OfisInfo[i][Biz_x],OfisInfo[i][Biz_y],OfisInfo[i][Biz_z]) && !strcmp(name,OfisInfo[i][Vladelec],true))
		{
			id = i;
			type = 2;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[3]; i++)//Склад
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,SkladInfo[i][Biz_x],SkladInfo[i][Biz_y],SkladInfo[i][Biz_z]) && !strcmp(name,SkladInfo[i][Vladelec],true))
		{
			id = i;
			type = 3;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[4]; i++)//Спортзал
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,SportzalInfo[i][Biz_x],SportzalInfo[i][Biz_y],SportzalInfo[i][Biz_z]) && !strcmp(name,SportzalInfo[i][Vladelec],true))
		{
			id = i;
			type = 4;
			return 1;
		}
	}
    for(new i; i < biz_LoadAmount[5]; i++)//Шиномонтаж
	{
	   if(IsPlayerInRangeOfPoint(playerid,2.0,ShinomontajInfo[i][Biz_x],ShinomontajInfo[i][Biz_y],ShinomontajInfo[i][Biz_z]) && !strcmp(name,ShinomontajInfo[i][Vladelec],true))
		{
			id = i;
			type = 5;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[6]; i++)//Клуб
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,KlubInfo[i][Biz_x],KlubInfo[i][Biz_y],KlubInfo[i][Biz_z]) && !strcmp(name,KlubInfo[i][Vladelec],true))
		{
			id = i;
			type = 6;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[7]; i++)//Магазин
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,MagazinInfo[i][Biz_x],MagazinInfo[i][Biz_y],MagazinInfo[i][Biz_z]) && !strcmp(name,MagazinInfo[i][Vladelec],true))
		{
			id = i;
			type = 7;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[8]; i++)//Заправка
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,ZapravkaInfo[i][Biz_x],ZapravkaInfo[i][Biz_y],ZapravkaInfo[i][Biz_z]) && !strcmp(name,ZapravkaInfo[i][Vladelec],true))
		{
			id = i;
			type = 8;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[9]; i++)//Аммунация
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,AmmunaciaInfo[i][Biz_x],AmmunaciaInfo[i][Biz_y],AmmunaciaInfo[i][Biz_z]) && !strcmp(name,AmmunaciaInfo[i][Vladelec],true))
		{
			id = i;
			type = 9;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[10]; i++)//Бар
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,BarInfo[i][Biz_x],BarInfo[i][Biz_y],BarInfo[i][Biz_z]) && !strcmp(name,BarInfo[i][Vladelec],true))
		{
			id = i;
			type = 10;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[11]; i++)//Мебельный салон
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,MebelSalonInfo[i][Biz_x],MebelSalonInfo[i][Biz_y],MebelSalonInfo[i][Biz_z]) && !strcmp(name,MebelSalonInfo[i][Vladelec],true))
		{
			id = i;
			type = 11;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[12]; i++)//Автосалон
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,AvtosalonInfo[i][Biz_x],AvtosalonInfo[i][Biz_y],AvtosalonInfo[i][Biz_z]) && !strcmp(name,AvtosalonInfo[i][Vladelec],true))
		{
			id = i;
			type = 12;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[13]; i++)//Одежда
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,OdejdaInfo[i][Biz_x],OdejdaInfo[i][Biz_y],OdejdaInfo[i][Biz_z]) && !strcmp(name,OdejdaInfo[i][Vladelec],true))
		{
			id = i;
			type = 13;
			return 1;
		}
	}
	for(new i; i < biz_LoadAmount[14]; i++)//Аренда
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,VehRentInfo[i][Biz_x],VehRentInfo[i][Biz_y],VehRentInfo[i][Biz_z]) && !strcmp(name,VehRentInfo[i][Vladelec],true))
		{
			id = i;
			type = 14;
			return 1;
		}
	}
	id = -1;
	type = -1;
	return -1;
}
stock CountPlayerBiz(playerid)//Подсчитать, каким кол-вом бизнесов владеет игрок
{
	new res, name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	for(new i; i < biz_LoadAmount[0]; i++)//Общепит
	{
	    if(!strcmp(ObshepitInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[1]; i++)//Ресторан
	{
	    if(!strcmp(RestoranInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[2]; i++)//Офис
	{
	    if(!strcmp(OfisInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[3]; i++)//Склад
	{
	    if(!strcmp(SkladInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[4]; i++)//Спортзал
	{
	    if(!strcmp(SportzalInfo[i][Vladelec],name,true))
		res ++;
	}
    for(new i; i < biz_LoadAmount[5]; i++)//Шиномонтаж
	{
	    if(!strcmp(ShinomontajInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[6]; i++)//Клуб
	{
	    if(!strcmp(KlubInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[7]; i++)//Магазин
	{
	    if(!strcmp(MagazinInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[8]; i++)//Заправка
	{
	    if(!strcmp(ZapravkaInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[9]; i++)//Аммунация
	{
	    if(!strcmp(AmmunaciaInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[10]; i++)//Бар
	{
	    if(!strcmp(BarInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[11]; i++)//Мебельный салон
	{
	    if(!strcmp(MebelSalonInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[12]; i++)//Автосалон
	{
	    if(!strcmp(AvtosalonInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[13]; i++)//Одежда
	{
	    if(!strcmp(OdejdaInfo[i][Vladelec],name,true))
		res ++;
	}
	for(new i; i < biz_LoadAmount[14]; i++)//Аренда
	{
	    if(!strcmp(VehRentInfo[i][Vladelec],name,true))
		res ++;
	}
	return res;
}
stock GetFreeJobPlace(type,id,name[])
{
	new slot = -1;
	switch(type)
	{
		case 0://Общепит
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(ObshepitZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(ObshepitZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 1://Ресторан
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(RestoranZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(RestoranZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 2://Офис
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(OfisZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(OfisZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 3://Склад
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(SkladZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(SkladZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 4://Спортзал
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(SportzalZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(SportzalZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 5://Шиномонтаж
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(ShinomontajZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(ShinomontajZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 6://Клуб
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(KlubZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(KlubZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 7://Магазин
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(MagazinZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(MagazinZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 8://Заправка
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(ZapravkaZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(ZapravkaZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 9://Аммунация
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(AmmunaciaZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(AmmunaciaZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 10://Бар
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(BarZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(BarZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 11://Мебельный салон
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(MebelZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(MebelZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 12://Автосалон
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(AvtosalonZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(AvtosalonZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 13://Одежда
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(OdejdaZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(OdejdaZPhone[id][i] == 0)
				slot = i;
			}
		}
		case 14://Аренда
		{
			for(new i; i < 5; i++)
			{
				if(!strcmp(VehRentZName[id][i],name,true))
				{
					slot = -2;
					break;
				}
				if(VehRentZPhone[id][i] == 0)
				slot = i;
			}
		}
	}
	return slot;
}