/*ВСЁ, ЧТО СВЯЗАНО ТОЛЬКО С ИГРОКАМИ, НАХОДИТСЯ В ЭТОЙ БИБЛИОТЕКЕ*/
#include <gamemode/zonenames>
forward GetFreeLetterSlot(playerid);//Узнать свободный слот для письма у данного игрока
forward IsAtPole(playerid);//Игрок в поле?
forward RemovePole(kust);//Удаляет посадку игрока
forward IsAtHotDogs(playerid);//Находится ли игрок возле палатки с хотдогами?
forward MeAction(playerid,string[],Float:radius);//Действия типа /ми
forward PlayerMovingObject(playerid);//Игрок двигает объект у себя в доме
forward Blinker(playerid);//Поворотники
forward SimpleTalk(playerid,string[]);//Обычный РП разговор
forward GlobalPlayerTimer();//Таймер на 1 секунду ТОЛЬКО для игроков
forward LookAtPlane(playerid);//Заставить игрока смотреть на самолет
forward StartWide(playerid);//Поставить черные полоски
forward StopWide(playerid);//Убрать черные полоски
forward EmptyMessages(playerid,count);//Отослать пустые сообщения
forward SetPlayerSpawn(playerid);//Выбирает точку спавна для игрока
forward OnPlayerLogin(playerid,password[]);//Авторизация игрока
forward SavePlayer(playerid);//Сохранение игрока
forward OnPlayerRegister(playerid, password[]);//Регистрация игрока
forward OnPlayerEnterFood(playerid, foodid);//Входит в фаст фуд
forward OnPlayerExitShop(playerid);//Выходит из магазина
forward OnPlayerEnterShop(playerid, shopid);//Входит в магазин
forward OnPlayerExitCloth(playerid);//Выходит из магазина одежды
forward OnPlayerEnterCloth(playerid, clothid);//Вход в магазин одежды
forward OnPlayerExitFood(playerid);//Выход из фаст фуда
forward ServerGivePlayerWeapons(playerid,weaponid,ammo);//Дать оружие игроку
forward ServerTakePlayerWeapon(playerid,weaponid);//Забрать оружие у игрока
forward ServerGivePlayerMoney(playerid, money);//Дать денег игроку
forward ServerGivePlayerArmour(playerid, Float:armour);//Дать броню игроку
forward ServerGivePlayerHealth(playerid, Float:health);//Дать здоровье игроку
forward IsAtDealership(playerid);//Здесь можно продать свое авто
forward IsPlayerNearPlayer(playerid,id,Float:range);//Один игрок рядом с другим
forward StdAnim(playerid);//Показывает анимацию при выборе стиля боя во время регистрации, стандартный стиль
forward BoxAnim(playerid,num);//Показывает анимацию при выборе стиля боя во время регистрации, бокс
forward KarAnim(playerid,num);//Показывает анимацию при выборе стиля боя во время регистрации, карате
forward ThaAnim(playerid,num);//Показывает анимацию при выборе стиля боя во время регистрации, тайский бокс
forward Injured(playerid);//Очистить анимацию и разрешить управление после ранения
forward FillUp(playerid);//Заправить машину данному игроку
forward LookOutside(playerid);//Смотреть в окно
forward Teleport(playerid);//Проверить игрока на телепорт
forward IsPlayerAtBank(playerid);//Проверяет, находится ли игрок в банке
forward AddShoulderWeapon(playerid,gunid);//Добавить игроку оружие за спину
forward RemoveShoulderWeapon(playerid);//Снять оружия со спины игрока
//Функции
encode_lights(light1, light2, light3, light4)//Для поворотников
{

	return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);

}
public GetFreeLetterSlot(playerid)
{
	for(new i = 0; i < MAX_PLAYER_LETTERS; i++)
	{
	    if(PlayerLetters[playerid][i] == 0)
	    return i;
	}
	return -1;
}
public IsAtPole(playerid)
{
    if(IsPlayerConnected(playerid))
	{
        if(IsPlayerInRangeOfPoint(playerid,80.0,-1469.2998,2310.7354,47.6369) || IsPlayerInRangeOfPoint(playerid,6.0,-2558.4705,2238.8594,4.9844) || IsPlayerInRangeOfPoint(playerid,6.0,-2361.4419,2445.6665,8.8077))
	    return 1;
        else if(IsPlayerInRangeOfPoint(playerid,6.0,-2330.1606,2438.7170,6.8585) || IsPlayerInRangeOfPoint(playerid,6.0,-2372.9878,2460.2627,9.3174) || IsPlayerInRangeOfPoint(playerid,6.0,-2451.0627,2463.9312,15.3311))
	    return 1;
        else if(IsPlayerInRangeOfPoint(playerid,6.0,-1454.1647,2645.1821,55.8359) || IsPlayerInRangeOfPoint(playerid,6.0,1389.1628,2177.0808,11.0234))
	    return 1;
	}
	return 0;
}
public RemovePole(kust)
{
	DestroyDynamicObject(BushObject[kust]);
	Delete3DTextLabel(BushLabel[kust]);
	BushObject[kust] = 0;
	BushOwner[kust] = "";
	return 1;
}
public IsAtHotDogs(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(IsPlayerInRangeOfPoint(playerid,4.0,-1496.903,2540.587,55.843)
		|| IsPlayerInRangeOfPoint(playerid,4.0,-1278.602,2706.910,50.040)
		|| IsPlayerInRangeOfPoint(playerid,4.0,405.997,2527.876,16.537)
		|| IsPlayerInRangeOfPoint(playerid,4.0,-2268.156,2355.506,4.866))
	    return 1;
		else if(IsPlayerInRangeOfPoint(playerid,4.0,-2410.161,2439.119,12.009))  return 1;
	}
	return 0;
}
public MeAction(playerid,string[],Float:radius)//Действия типа /ми
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
	    if(IsPlayerNearPlayer(playerid,i,radius))
	    {
	        SendClientMessage(i,COLOR_PURPLE,string);
	    }
	}
	return 1;
}
public Blinker(playerid)//Поворотник
{
	if(IsPlayerConnected(playerid))
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new carid = GetPlayerVehicleID(playerid);
	        new d[4];
			GetVehicleDamageStatus(carid, d[0], d[1], d[2], d[3]);
			if(blinker[playerid] == 1)//Правый поворотник
			{
				if(blinkerON[playerid])//Если фара включена
				{
			    	d[2] = encode_lights(1, 0, 0, 0);
			    	blinkerON[playerid] = false;
				}
				else
				{
				    d[2] = encode_lights(1, 1, 1, 1 );
				    blinkerON[playerid] = true;
				}
			    UpdateVehicleDamageStatus(carid, d[0], d[1], d[2], d[3]);
			    blinkertimer[playerid] = SetTimerEx("Blinker",500,false,"i",playerid);
			}
			else if(blinker[playerid] == 2)//Левый поворотник
			{
				if(blinkerON[playerid])//Если фара включена
				{
			    	d[2] = encode_lights(0, 0, 0, 1);
			    	blinkerON[playerid] = false;
				}
				else
				{
				    d[2] = encode_lights(1, 1, 1, 1 );
				    blinkerON[playerid] = true;
				}
			    UpdateVehicleDamageStatus(carid, d[0], d[1], d[2], d[3]);
			    blinkertimer[playerid] = SetTimerEx("Blinker",500,false,"i",playerid);
			}
			else
			{
			    d[2] = encode_lights(0, 0, 0, 0 );
			    UpdateVehicleDamageStatus(carid, d[0], d[1], d[2], d[3]);
			}
		}
	}
	return 1;
}
public SimpleTalk(playerid,string[])
{
	new l = PlayerCurLang[playerid];
	new string1[512], string2[512], name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
    format(string1,sizeof(string1),"%s говорит: %s",name,string);
	format(string2,sizeof(string2),"%s says: %s",name,string);
	if(l == 0)//Стандартный язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
				if(IsPlayerNearPlayer(i,playerid,5.0))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
		    }
		}
	}
	else if(l == 1)//Английский язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
		        if(PlayerInfo[i][pLangEng] == 1)//Если они знают английский язык
		        {
		            format(string1,sizeof(string1),"%s говорит(англ): %s",name,string);
					format(string2,sizeof(string2),"%s says(eng): %s",name,string);
				}
				else//Если нет
				{
				    format(string1,sizeof(string1),"%s говорит что-то на английском азыке",name);
					format(string2,sizeof(string2),"%s says something on english language",name);
				}
				if(IsPlayerNearPlayer(i,playerid,5))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
			}
	   }
  	}
  	else if(l == 2)//Японский язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
		        if(PlayerInfo[i][pLangJap] == 1)//Если они знают японский язык
		        {
		            format(string1,sizeof(string1),"%s говорит(япон): %s",name,string);
					format(string2,sizeof(string2),"%s says(jap): %s",name,string);
				}
				else//Если нет
				{
				    format(string1,sizeof(string1),"%s говорит что-то на японском азыке",name);
					format(string2,sizeof(string2),"%s says something on japanese language",name);
				}
				if(IsPlayerNearPlayer(i,playerid,5))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
			}
	   }
  	}
  	else if(l == 3)//Итальянский язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
		        if(PlayerInfo[i][pLangIta] == 1)//Если они знают итальянский язык
		        {
		            format(string1,sizeof(string1),"%s говорит(итал): %s",name,string);
					format(string2,sizeof(string2),"%s says(ital): %s",name,string);
				}
				else//Если нет
				{
				    format(string1,sizeof(string1),"%s говорит что-то на итальянском азыке",name);
					format(string2,sizeof(string2),"%s says something on itallian language",name);
				}
				if(IsPlayerNearPlayer(i,playerid,5))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
			}
	   }
  	}
  	else if(l == 4)//Русский язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
		        if(PlayerInfo[i][pLangRus] == 1)//Если они знают Русский язык
		        {
		            format(string1,sizeof(string1),"%s говорит(рус): %s",name,string);
					format(string2,sizeof(string2),"%s says(rus): %s",name,string);
				}
				else//Если нет
				{
				    format(string1,sizeof(string1),"%s говорит что-то на русском азыке",name);
					format(string2,sizeof(string2),"%s says something on russian language",name);
				}
				if(IsPlayerNearPlayer(i,playerid,5))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
			}
	   }
  	}
  	else if(l == 5)//Французский язык
	{
		for(new i = 0; i < MAX_PLAYERS; i ++)
		{
		    if(IsPlayerConnected(i))
		    {
		        if(PlayerInfo[i][pLangFra] == 1)//Если они знают Французский язык
		        {
		            format(string1,sizeof(string1),"%s говорит(франц): %s",name,string);
					format(string2,sizeof(string2),"%s says(fra): %s",name,string);
				}
				else//Если нет
				{
				    format(string1,sizeof(string1),"%s говорит что-то на французском азыке",name);
					format(string2,sizeof(string2),"%s says something on french language",name);
				}
				if(IsPlayerNearPlayer(i,playerid,5))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE1,string1);
				    else    SendClientMessage(i,COLOR_FADE1,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,10))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE2,string1);
				    else    SendClientMessage(i,COLOR_FADE2,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,15))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE3,string1);
				    else    SendClientMessage(i,COLOR_FADE3,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,20))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE4,string1);
				    else    SendClientMessage(i,COLOR_FADE4,string2);
				}
				else if(IsPlayerNearPlayer(i,playerid,25))
				{
				    if(PlayerLang[i] == 1)    SendClientMessage(i,COLOR_FADE5,string1);
				    else    SendClientMessage(i,COLOR_FADE5,string2);
				}
			}
	   }
  	}
	return 1;
}
public GlobalPlayerTimer()
{
	new h,m,s, string[256];
	gettime(h,m,s);
	if(m == 0 && s == 0)
	{
		PayDay();
		if(WorldTime == 23)
		WorldTime = 0;
		else
		WorldTime ++;
		SetWorldTime(WorldTime);
		
	}
	for(new i = 0; i < maxweapons; i++)
    {
		if(DroppedTime[i] > 0)
		{
		    DroppedTime[i] --;
			if(DroppedTime[i] == 0)
			{
			    if(IsValidDynamicObject(DroppedWeaponsObj[i]))
			    DestroyDynamicObject(DroppedWeaponsObj[i]);
		        DroppedWeapons[i] = 0;
		        DroppedAmmo[i] = 0;
			}
		}
	}
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
	    if(IsPlayerConnected(i) && !IsPlayerNPC(i))
	    {
	            if(PlayerSpawned[i] == 1)
				AntiCheat(i);//Проверяем его на читерство
				if(PlayerMoveObject[i] != 0)//Если игрок устанавливает у себя дома объект
				{
					new Float:x,Float:y,Float:z;
					GetDynamicObjectPos(PlayerMoveObject[i],x,y,z);
					if(!IsPlayerInRangeOfPoint(i,10,x,y,z))
					{
					    DestroyDynamicObject(PlayerMoveObject[i]);
					    PlayerMoveObject[i] = 0;
					    if(PlayerLang[i] == 1)
					    SendClientMessage(i,COLOR_GREY,"Установка объекта в доме отменена");
					    else
					    SendClientMessage(i,COLOR_GREY,"Object in your house canceled");
					}
				}
				if(break_lock[i] >= 1)
				{
					break_lock[i]--;
					format(string, sizeof(string), "Seconds left: %d",break_lock[i]);
					GameTextForPlayer(i, string, 1500, 4);
					if(break_lock[i] == 0)
					{
						if(random(100) < 20)//Успешно
						{
							UnLockCar(gLastCar[i]);
							TogglePlayerControllable(i, true);
							GameTextForPlayer(i, "~g~ Lock Succesfully Broken", 2500, 1);
						}
						else
						GameTextForPlayer(i, "~r~ You are failed to break this lock", 2500, 1);
					}
				}
				if(car_jack[i] >= 1)
				{
					car_jack[i]--;
					format(string, sizeof(string), "Seconds left: %d", car_jack[i]);
					GameTextForPlayer(i, string, 1500, 4);
					if(car_jack[i] == 0)
					{
						if(random(100) < 20)//Успешно
						{
							new carid = GetPlayerVehicleID(i);
							if(Engine[carid] == 0)
							{
								Engine[carid] = 1;
								TogglePlayerControllable(i,true);
								GameTextForPlayer(i, "~g~ Engine Succesfully Started", 2500, 1);
							}
						}
						else
						GameTextForPlayer(i, "~r~ You are failed to start an engine", 2500, 1);
					}
				}
		
    			/*	for(new sl = 0; sl < 12; sl ++)//Дает 1 патрон, если у игрока есть оружие, но нет патронов
				{
				    if(PlayerGun[i][sl] != 0 && PlayerAmmo[i][sl] == 0)
				    ServerGivePlayerWeapons(i,PlayerGun[i][sl],1);
				}*/
				new gt = GetPVarInt(i,"AvtomatTimer");
				if(gt > 0)
				SetPVarInt(i,"AvtomatTimer",gt-1);
				gt = GetPVarInt(i,"GolodTimer");
				if(gt >= 0)
				{
					SetPVarInt(i,"GolodTimer",gt-1);
					if(gt-1 <= 0)//Надо уменьшить полоску голода
					{
						new g = GetPVarInt(i,"Golod");
						if(g > 0)
						{
							SetPVarInt(i,"Golod",g-1);
							if(GetPVarInt(i,"GolodInfoHide") == 0)
							{
								TextDrawHideForPlayer(i,FoodString[i]);
								TextDrawTextSize(FoodString[i],503.0+GetPVarInt(i,"Golod"),0.000000);
								if(GetPVarInt(i,"Golod") > 0 && GetPlayerState(i) != PLAYER_STATE_WASTED)
								TextDrawShowForPlayer(i,FoodString[i]);
							}
						}
						else
						{
							new name[MAX_PLAYER_NAME];
							GetPlayerName(i,name,sizeof(name));
							format(string,sizeof(string),"* У %s от голода бурчит в животе",name);
							MeAction(i,string,15.0);
							if(random(3) == 0)
							ApplyAnimation(i,"CRACK","crckdeth2",4.1,0,1,1,1,1);
							new dl = GetPlayerDrunkLevel(i);
							if(dl < 3000)
							dl = 3000;
							else
							dl +=1000;
							SetPlayerDrunkLevel(i,dl);
						}
						SetPVarInt(i,"GolodTimer",60);
					}
				}
				gt = GetPVarInt(i,"JajdaTimer");
				if(gt >= 0)
				{
					if(GetPlayerState(i) == PLAYER_STATE_WASTED)
					TextDrawHideForPlayer(i,WaterString[i]);
					SetPVarInt(i,"JajdaTimer",gt-1);
					if(gt-1 <= 0)//Надо уменьшить полоску жажды
					{
						new g = GetPVarInt(i,"Jajda");
						if(g > 0)
						{
							SetPVarInt(i,"Jajda",g-1);
							if(GetPVarInt(i,"JajdaInfoHide") == 0)
							{
								TextDrawHideForPlayer(i,WaterString[i]);
								TextDrawTextSize(WaterString[i],503.0+GetPVarInt(i,"Jajda"),0.000000);
								if(GetPVarInt(i,"Jajda") > 0 && GetPlayerState(i) != PLAYER_STATE_WASTED)
								TextDrawShowForPlayer(i,WaterString[i]);
							}
						}
						else
						{
							new name[MAX_PLAYER_NAME];
							GetPlayerName(i,name,sizeof(name));
							format(string,sizeof(string),"* %s хочет пить",name);
							MeAction(i,string,15.0);
							if(random(3) == 0)
							ApplyAnimation(i,"CRACK","crckdeth2",4.1,0,1,1,1,1);
							//ServerGivePlayerHealth(i,PlayerHealth[i]-1);
							new dl = GetPlayerDrunkLevel(i);
							if(dl < 3000)
							dl = 3000;
							else
							dl +=1000;
							SetPlayerDrunkLevel(i,dl);
						}
						SetPVarInt(i,"JajdaTimer",40);
					}
				}
				if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
				{
					new carid = GetPlayerVehicleID(i);
					if(CarInfo[carid][cGas] < 1)
				    TogglePlayerControllable(i,0);
					if(IsAOwnableVehicle(carid))
					{
						if(CarInfo[carid][cRepaired] == 1)
						{
							if(floatfract(CarInfo[carid][cProbeg]/1000) == 0)
							CarInfo[carid][cRepaired] = 0;
						}
						if(CarInfo[carid][cProbeg] >= 1000 && CarInfo[carid][cZagloh] == 0)
						{
							if(CarInfo[carid][cRepaired] == 0)
							CarInfo[carid][cZagloh] = 300+random(300);
							else
							CarInfo[carid][cZagloh] = 3600+random(300);
						}
						if(CarInfo[carid][cZagloh] > 0)
						CarInfo[carid][cZagloh] --;
						if(CarInfo[carid][cZagloh] == 0 && Engine[carid] == 1)
						{
								Engine[carid] = 0;
								new name[MAX_PLAYER_NAME];
								GetPlayerName(i,name,sizeof(name));
								format(string,sizeof(string),"* Машина заглохла ((%s))",name);
								MeAction(i,string,20);
						}
						format(string, sizeof(string), "~g~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%~n~~b~Probeg:~w~ %d",floatround(CarInfo[carid][cGas],floatround_round),floatround(CarInfo[carid][cProbeg]/1000,floatround_round));
					}
					else
					format(string, sizeof(string), "~g~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",floatround(CarInfo[carid][cGas],floatround_round));
		      		GameTextForPlayer(i,string,2000,3);
					new speed = GetVehicleSpeed(carid);
					CarInfo[carid][cProbeg] +=floatround(speed*0.28,floatround_round);
				}
				
				if(PlayerInfo[i][pHospTimeLeft] > 0)
				{
				    format(string, sizeof(string), "~g~Seconds Left: ~w~ %d", PlayerInfo[i][pHospTimeLeft]);
				    GameTextForPlayer(i, string, 3000, 4);
				    PlayerInfo[i][pHospTimeLeft] --;
				    if(PlayerInfo[i][pHospTimeLeft] == 0)
				    {
				        SetPlayerPos(i,1178.2842,-1323.5819,14.1125);
				        SetPlayerVirtualWorld(i,0);
				        SetPlayerInterior(i,0);
				        SetCameraBehindPlayer(i);
				        SetPlayerFacingAngle(i,266.3458);
    				    SetPlayerHealth(i,100);
    				    TogglePlayerControllable(i,1);
    				    PlayerSpawned[i] = 1;
   				    }
				}
				if(PosadkaTime[i] > 1)
				PosadkaTime[i] --;
				if(PlayerVaritGeroin[i] > 0)
				{
					PlayerVaritGeroin[i] --;
					if(PlayerVaritGeroin[i] == 0)
					{
					    TogglePlayerControllable(i,1);
					    PlayerInfo[i][pGeroin] += PlayerGeroin[i];
					    PlayerGeroin[i] = 0;
					    new name[MAX_PLAYER_NAME];
					    GetPlayerName(i,name,sizeof(name));
					    format(string,sizeof(string),"%s сварил героин",name);//Поставь свое сообщение
					    MeAction(i,string,20.0);
					}
				}
				if(GetPVarInt(i,"Tried") > 0)
				SetPVarInt(i,"Tried",GetPVarInt(i,"Tried")-1);
				if(PlayerTravaEffect[i] > 0)
				{
					PlayerTravaEffect[i] --;
					SetPlayerDrunkLevel(i,2500);
					if(PlayerTravaEffect[i] == 0)
					{
					    SetPlayerDrunkLevel(i,0);
					    SetPlayerWeather(i,1);
					}
				}
				if(PlayerGeroinEffect[i] > 0)
				{
					PlayerGeroinEffect[i] --;
					if(PlayerGeroinEffect[i] == 0)
					{
						new Float:hp;
						GetPlayerHealth(i,hp);
						ServerGivePlayerHealth(i,hp-100);
					    SetPlayerWeather(i,1);
					}
				}
	            TextDrawDestroy(PlayerZoneName[i]);
		        new zone[MAX_ZONE_NAME];
	        	GetPlayer2DZone(i, zone, MAX_ZONE_NAME);
		        PlayerZoneName[i] = TextDrawCreate(470.0,420.0,zone);
		    	TextDrawShowForPlayer(i,PlayerZoneName[i]);

		    	if(engine_start[i] >= 1)
				{
				    engine_start[i]++;
	   			}
	   			if(engine_start[i] >= 5)
	   			{
	   			    new carid = GetPlayerVehicleID(i);
	   			    if(IsPlayerInVehicle(i, carid))
	   			    {
	   			        if(Engine[carid] == 0)
	   			        {
		             		engine_start[i]=0;
	   			        	EngineStart(i, carid);
				  		}
			  		}
	   			}
    			if(TutTime[i] >= 1) //новое самолёт летит  =========ОБУЧЕНИЕ========
				{
	   			    TutTime[i] += 1;
					if(TutTime[i] == 2)
				    {
				        Plane[i] = CreateDynamicObject(1683, 1131.3394,-2491.4011,120.4525,0,0,0,-1,-1,i,200);
						MoveDynamicObject(Plane[i],1591.6318,-2493.0278,13.5547,10.0);
      		            LookAtPlane(i);
			            SetPlayerCameraPos(i,1298.5790,-2410.4385,93.1684);
			            SetPlayerPos(i,1298.5790,-2392.4385,86.1684);
			            TogglePlayerControllable(i,0);
					}
	      			if(TutTime[i] == 5)
				    {
				        if(PlayerLang[i] == 1)
				        {
		        	        SendClientMessage(i, COLOR_YELLOW2, "|____ Обучающая программа: Начало ____|");
		        	        SendClientMessage(i, COLOR_LIGHTGREEN, "На ваше имя открыт банковский счёт, посмотреть данные /chet ");
					        SendClientMessage(i, COLOR_YELLOW2, " Здраствуйте, Вы зашли к нам на сервер Cream Life.");
					        SendClientMessage(i, COLOR_YELLOW2, " Каждый игрок, пришедщий на сервер, автоматически соглашается с нашими правилами.");
					        SendClientMessage(i, COLOR_YELLOW2, " Сейчас вам будет показано правила нашего сервера. ");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, "|____ Tutorial: Intro ____|");
		        	        SendClientMessage(i, COLOR_LIGHTGREEN, "You got an account at the bank, you can check it with /chet ");
					        SendClientMessage(i, COLOR_YELLOW2, " Hello, Welcome at our server Cream Life.");
					        SendClientMessage(i, COLOR_YELLOW2, " Every player on our server is automatically accept our rules");
					        SendClientMessage(i, COLOR_YELLOW2, " Now you will see it. ");
						}
					}
				    else if(TutTime[i] == 15)
				    {
				        if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Вид сервера ____|");
				        else
				        SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Kind of server ____|");
				    }
				    else if(TutTime[i] == 18)
				    {
				        if(PlayerLang[i] == 1)
				        {
					        SendClientMessage(i, COLOR_YELLOW2, " Этот сервер постоянно обновляется и администрируется..");
					        SendClientMessage(i, COLOR_YELLOW2, " Сервер имееи статус RP, здесь у каждого своя роль и вы одолжны её отыгрывать.");
					        SendClientMessage(i, COLOR_YELLOW2, " Если вы не играли на такого рода серверах, то смотрите как играют другие игроки.");
					        SendClientMessage(i, COLOR_YELLOW2, " Дополнительную информация вы можите найти на нашем сайте http://ekabum.ru");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " Our server is updating everytime");
					        SendClientMessage(i, COLOR_YELLOW2, " This is Roleplay server, you got your role and you MUST play it");
					        SendClientMessage(i, COLOR_YELLOW2, " If you havn't got any experience, just watch how another players do it.");
					        SendClientMessage(i, COLOR_YELLOW2, " You can find more info at our website: http://ekabum.ru");
						}
				    }
				    else if(TutTime[i] == 28)
				    {
				        if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Начало игры ____|");
				        else
				        SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Start ____|");
				    }
				    else if(TutTime[i] == 31)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Сейчас вам желательно добраться до мерии , где вы сможете получить паспорт.");
					        SendClientMessage(i, COLOR_YELLOW2, " После вы можете добраться до автошколы и попробовать сдать на права.");
					        SendClientMessage(i, COLOR_YELLOW2, " Вам надо найти жильё, и сменить ваш внешний вид можно в магазине одежды.");
		                    SendClientMessage(i, COLOR_YELLOW2, "");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " Now you should go to the City Hall and receive passport there");
					        SendClientMessage(i, COLOR_YELLOW2, " Then you can try to get a driving license at the driving school");
					        SendClientMessage(i, COLOR_YELLOW2, " You should find a house and change your skin.");
		                    SendClientMessage(i, COLOR_YELLOW2, "");
						}
					}
				    else if(TutTime[i] == 41)
				    {
				        if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Работы на сервере ____|");
				        else
				        SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Jobs ____|");
				    }
				    else if(TutTime[i] == 45)
				    {
				        if(PlayerLang[i] == 1)
				        {
					        SendClientMessage(i, COLOR_YELLOW2, " Устроиться на легальные работы вы можете в мерии в отдельном кабинете.");
					        SendClientMessage(i, COLOR_YELLOW2, " Вы думаете вы придёте и вас сразу-же примут - нет, вы ошибаетесь вас могут и не принять на работу. (70% что примут,30%откажут).");
					        SendClientMessage(i, COLOR_YELLOW2, " Каждый час помимо зарплаты, вам будет премия от 50$ до 200$.");
					        SendClientMessage(i, COLOR_YELLOW2, " Cоветуем вам не бездельничать на работе, если вы не будете работать вас уволят.");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " You can get a legal job at the City Hall");
					        SendClientMessage(i, COLOR_YELLOW2, " You got 70 percent that you will be accepted in your job");
					        SendClientMessage(i, COLOR_YELLOW2, " Every payday, you will receive a bonus in 50$-200$.");
					        SendClientMessage(i, COLOR_YELLOW2, " You should do your job every payday or you can be fired.");
						}
				    }
				    else if(TutTime[i] == 55)
				    {
				        if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Читы ____|");
				        else
				        SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Cheats/hacks ____|");
				    }
				    else if(TutTime[i] == 58)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Читерство и багоюзерство на сервере строго запрещенно.");
					        SendClientMessage(i, COLOR_YELLOW2, " Чит/багоюз денег - сразу бан без предупреждения.");
					        SendClientMessage(i, COLOR_YELLOW2, " Другие читы так-же запрещенны, администратор сам выбирает наказание (бан/тюрьма)");
					        SendClientMessage(i, COLOR_YELLOW2, " Если вы увидили читера, просьба написать в /report ID причину.");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " You are not allowed to use any kind of cheats/hacks at our server.");
					        SendClientMessage(i, COLOR_YELLOW2, " Or you will be kicked/banned");
					        SendClientMessage(i, COLOR_YELLOW2, " If you find a cheater, please report it with /report ID reason.");
						}
					}
				    else if(TutTime[i] == 68)
				    {
				        if(PlayerLang[i] == 1)
				    	SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Рекламирование ____|");
				    	else
				    	SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Advertising ____|");
				    }
				    else if(TutTime[i] == 71)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Реклама любого другого сайта или IP Адрес - строго наказуемо.");
					        SendClientMessage(i, COLOR_YELLOW2, " Если вы увидили кого-то кто рекламирует IP или другой сайт, напишите ( /report ID реклама ).");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " Advertising of any another webside/server is not allowed.");
					        SendClientMessage(i, COLOR_YELLOW2, " If you see that someone breaks this rule - use ( /report ID advertising ).");
						}
				    }
				    else if(TutTime[i] == 81)
				    {
				        if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Обучающая программа: Язык ____|");
				        else
				        SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Language ____|");
				    }
				    else if(TutTime[i] == 84)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Это русский сервер, и в чате вы должны использовать строго русский язык.");
					        SendClientMessage(i, COLOR_YELLOW2, " Если Вы хотите говорить с кем-то на вашем собственном Языке, используйте /w , /b , /sms , команды");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " This is a russian server, you should use russian language in any chat.");
					        SendClientMessage(i, COLOR_YELLOW2, "If you wanna to talk with someone in your own language, use /w , /b , /sms , commands");
						}
				    }
				    else if(TutTime[i] == 94)
				    {
						if(PlayerLang[i] == 1)
				        SendClientMessage(i, COLOR_YELLOW, "|____ Теперь мы вам предложим изучить краткий курс RP правил. ____|");
						else
						SendClientMessage(i, COLOR_YELLOW, "|____ Short Course of Roleplay Rules____|");
				    }
				    else if(TutTime[i] == 107)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " RP в переводе - RolePlay, Ролевая Игра");
					        SendClientMessage(i, COLOR_YELLOW2, " Когда вы начнёте играть, вы должны вжиться в роль.");
					        SendClientMessage(i, COLOR_YELLOW2, " Представьте что вы прилетели в новым штат, где вас не кто не знает, вы должны сами решить как себя посторить.");
		                    SendClientMessage(i, COLOR_YELLOW2, " Построить себя можно по разному, стать бандитом, а может полицейский, а может вы хотите пробиться на пост Мера?- вам не кто не мешает.");
		                    SendClientMessage(i, COLOR_YELLOW2, " Создай свою роль сам.");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " RP - Role Play Game");
					        SendClientMessage(i, COLOR_YELLOW2, " When you'll start playing - play your role as good as you can");
					        SendClientMessage(i, COLOR_YELLOW2, " Imagine: you are in the new state, you don't know no-one, you should build all by yourself");
		                    SendClientMessage(i, COLOR_YELLOW2, " You be what you want: criminal, policeman or maybe City Mayor?");
		                    SendClientMessage(i, COLOR_YELLOW2, " Make your own role");
						}
					}
					else if(TutTime[i] == 110)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Вы не можете подойти к любому человеку, прочитать его ник и сказать :");
					        SendClientMessage(i, COLOR_YELLOW2, " - Вася привет, чё тут надо делать. (и т.д)");
					        SendClientMessage(i, COLOR_YELLOW2, " Это будет нонрп, т.к по РП вы не знаете как его зовут пока не познакомитесь.");
					        SendClientMessage(i, COLOR_YELLOW2, " По РП будет так :");
					        SendClientMessage(i, COLOR_YELLOW2, " - Здравствуйте, не подскажите где находиться автошкола? (пример).");
		                    SendClientMessage(i, COLOR_YELLOW2, " Если всё таки вам надо спросить то что не относиться к РП, пишите в ( /b )");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " You can't just ask someone, like :");
					        SendClientMessage(i, COLOR_YELLOW2, " - Sup Andre, what should i do?)");
					        SendClientMessage(i, COLOR_YELLOW2, " This is NonRP, you can't do it until you don't know this person");
					        SendClientMessage(i, COLOR_YELLOW2, " It should be like this :");
					        SendClientMessage(i, COLOR_YELLOW2, " - Hello, where can i find driving school? (example).");
		                    SendClientMessage(i, COLOR_YELLOW2, " If you need to ask somethink that is not belongs to the game, use ( /b )");
						}
				    }
				    else if(TutTime[i] == 123)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " На сервере присутствует очень много чатов.");
					        SendClientMessage(i, COLOR_YELLOW, " Сейчас мы вам поясним главные чаты.");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " There is alot of chats.");
					        SendClientMessage(i, COLOR_YELLOW, " Here is most important.");
						}
				    }
				    else if(TutTime[i] == 126)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /me - это то что вы делате.");
					        SendClientMessage(i, COLOR_GREEN, " Пример: /me Достал из кармана пачку сигарет.");
					        SendClientMessage(i, COLOR_GREEN, " Пример: /me Протянул пачку сигарет человеку стоящему рядом.");
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /me - what are you doint.");
					        SendClientMessage(i, COLOR_GREEN, " Example: /me takes out cigarette.");
					        SendClientMessage(i, COLOR_GREEN, " Example: /me gives cigarette to person in front of him.");
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
				    }
				    else if(TutTime[i] == 138)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /do - действие от 3 лица.");
					        SendClientMessage(i, COLOR_GREEN, " Example: /do подвернул ногу.");
					        SendClientMessage(i, COLOR_GREEN, " Example: /do упал, не может бежать.");
					        SendClientMessage(i, COLOR_GREEN, " После чего вы начинаете отыгрывать РП на эту тему.");
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /do - action from 3d person.");
					        SendClientMessage(i, COLOR_GREEN, " Пример: /do sprained leg.");
					        SendClientMessage(i, COLOR_GREEN, " Пример: /do fell, can't run.");
					        SendClientMessage(i, COLOR_GREEN, " After it you should roleplay it.");
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
				    }
				   	else if(TutTime[i] == 151)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /try - получаеться/ не получаеться.");
					        SendClientMessage(i, COLOR_GREEN, " Этот чат обязательно нужен для РП ситуаций.");
					        SendClientMessage(i, COLOR_GREEN, " Пример: /try выстрелил бежащему человеку в ногу(удачно).");
					        SendClientMessage(i, COLOR_GREEN, " Удачно - значит  вы попали. Значит человек падает и продолжает РП.");
		                    SendClientMessage(i, COLOR_GREEN, " Пример: /try выстрелил бежащему человеку в ногу(не удачно).");
		                    SendClientMessage(i, COLOR_GREEN, " Значит  вы промахнулись.");
							SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /try - successfully/ unsuccessfully.");
					        SendClientMessage(i, COLOR_GREEN, " This chat you can use for RP situations.");
					        SendClientMessage(i, COLOR_GREEN, " Example: /try shot in the leg of running man(succesfully).");
					        SendClientMessage(i, COLOR_GREEN, " Succesfully - then you hit him. That person should continue RP.");
		                    SendClientMessage(i, COLOR_GREEN, " Example: /try shot in the leg of running man(unsuccessfully).");
		                    SendClientMessage(i, COLOR_GREEN, " That means that you are missed.");
							SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
				    }
				    else if(TutTime[i] == 165)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /b - нонрп чат.");
					        SendClientMessage(i, COLOR_GREEN, " В ( /b ) вы можете писать хоть что.");
					        SendClientMessage(i, COLOR_GREEN, " Конечно кроме рекламы.");
					        SendClientMessage(i, COLOR_GREEN, " То что вы пишите в /b не может относиться к РП, допустим вы написали.");
		                    SendClientMessage(i, COLOR_GREEN, " Пример: /b Давай ID-.. убьём по РП? или похитим ?.");
		                    SendClientMessage(i, COLOR_GREEN, " Вы можете обсудить, но после этого начинайте общяться в обычный чат и это обсуждать ещё раз в обычный чат.");
							SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
					        SendClientMessage(i, COLOR_GREEN, " /b - OOC chat.");
					        SendClientMessage(i, COLOR_GREEN, " In ( /b ) you can write anythink.");
					        SendClientMessage(i, COLOR_GREEN, " But not an advertisement, offcourse.");
					        SendClientMessage(i, COLOR_GREEN, " Written in /b can't be IC");
		                    SendClientMessage(i, COLOR_GREEN, " Example: /b Let's ID-.. kill by RP? or kidnap ?.");
		                    SendClientMessage(i, COLOR_GREEN, " You can discuss it, But after it you should RP it in IC chat.");
							SendClientMessage(i, COLOR_YELLOW, " -----------------------------------");
						}
				    }
				    else if(TutTime[i] == 180)
				    {
						if(PlayerLang[i] == 1)
						{
					        SendClientMessage(i, COLOR_YELLOW2, " Спасибо за внимание.");
					        SendClientMessage(i, COLOR_YELLOW2, " Мы надеемся вы прочитали правила и будете соблюдать правила.");
					        SendClientMessage(i, COLOR_LIGHTBLUE, " Сайт сервера : http://ekabum.ru ");
					        SendClientMessage(i, COLOR_YELLOW2, " Вопросы по игре можете задать в ( /support [вопрос] )");
		                    SendClientMessage(i, COLOR_YELLOW2, " Жалобы можете подать в ( /report ID жалоба )");
		                    SendClientMessage(i, COLOR_YELLOW2, " Приятной вам игры.");
						}
						else
						{
						    SendClientMessage(i, COLOR_YELLOW2, " Thanks for antention.");
					        SendClientMessage(i, COLOR_YELLOW2, " We hope you will not break our rules");
					        SendClientMessage(i, COLOR_LIGHTBLUE, " Our website : http://ekabum.ru ");
					        SendClientMessage(i, COLOR_YELLOW2, " Any questions IG you can ask in ( /support [вопрос] )");
		                    SendClientMessage(i, COLOR_YELLOW2, " Complaints - ( /report ID жалоба )");
		                    SendClientMessage(i, COLOR_YELLOW2, " Good Luck.");
						}
				    }
				    else if(TutTime[i] == 195)
				    {
						EmptyMessages(i, 100);
						if(PlayerLang[i] == 1)
						{
							SendClientMessage(i, COLOR_WHITE, "*Стюардесса: Наш рейс прибыл в айропорт Los Santos'a.");
							SendClientMessage(i, COLOR_WHITE, "*Стюардесса: Спасибо за использование нашей фирмой, Air-Wings.");
							SendClientMessage(i, COLOR_WHITE, "*Стюардесса: Всех пассажиров просьба пройти к выходу.");
						}
						else
						{
						    SendClientMessage(i, COLOR_WHITE, "*Stewardess: We have arrived in Los Santos.");
							SendClientMessage(i, COLOR_WHITE, "*Stewardess: Thank you for using of our service: Air-Wings.");
							SendClientMessage(i, COLOR_WHITE, "*Stewardess: Now you can leave the plane.");
						}
						if(PlayerLang[i] == 1)
						SendClientMessage(i,COLOR_WHITE,"Для игры на нашем сервере Вам необходимо пройти небольшой тест");
						else
						SendClientMessage(i,COLOR_WHITE,"You should pass a little test before you can play");
		        		new q[64],ans0[64],ans1[64],ans2[64];
						new num = random(10);
						if(PlayerLang[i] == 1)
						{
				            GetPlayerRpQuestion(num,q,ans0,ans1,ans2);
				            SendClientMessage(i,COLOR_GREEN,"-------------|| Вопрос ||---------------");
						}
						else
						{
				            GetPlayerRpQuestionEn(num,q,ans0,ans1,ans2);
				            SendClientMessage(i,COLOR_GREEN,"-------------|| Question ||---------------");
						}
			            SendClientMessage(i,COLOR_YELLOW,q);
						PlayerRPQuestions[i][num] = 1;
						num = random(3);
						if(num == 0)
						format(string,sizeof(string),"%s\n%s\n%s",ans0,ans1,ans2);
						else if(num == 1)
						format(string,sizeof(string),"%s\n%s\n%s",ans1,ans0,ans2);
						else if(num == 2)
						format(string,sizeof(string),"%s\n%s\n%s",ans2,ans1,ans0);
						CurrentAnswer[i] = num;
						if(PlayerLang[i] == 1)
						ShowPlayerDialog(i,29,DIALOG_STYLE_LIST,"Варианты ответа",string,"Выбрать","Выбрать");
						else
						ShowPlayerDialog(i,29,DIALOG_STYLE_LIST,"Select your answer",string,"Select","Select");
				    }
				}
		}
	}
	return 1;
}
public SetPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pTut] == 0)
	{
	    SetPlayerVirtualWorld(playerid,playerid);
 		if(PlayerLang[playerid] == 1)
		ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Пожалуйста, выберите пол вашего персонажа","Мужчина\nЖенщина","Ок","ОК");
		else
		ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Please, select your gender","Male\nFemale","Ok","Ok");
		SetPlayerCameraPos(playerid, 1.3905,27.2070,1199.5938 );
        SetPlayerInterior(playerid,1);
        SetPlayerPos(playerid,2.8155,28.6501,1199.5938);
        SetPlayerFacingAngle(playerid,3.9150);
		SetPlayerCameraLookAt(playerid, 2.8155,28.6501,1199.5938 );
		ApplyAnimation(playerid,"PED","SEAT_down",4.1,0,0,0,1,1);
		SetPlayerVirtualWorld(playerid,playerid);
	}
	else
	{
	    if(JustDied[playerid] == 1)//Если игрок только что умер
		{
		    ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,1,0);
		    SendClientMessage(playerid, COLOR_WHITE, "Вы потеряли сознание...");
	 		SendClientMessage(playerid, COLOR_WHITE, "Введите /acceptdeath для спавна в больнице, или /canceldeath для продолжение РП.");
		    TogglePlayerControllable(playerid, 0);
		    PlayerInfo[playerid][pInjured] = 1;
		    ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,1,0);
		    SetPlayerPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
			SetPlayerInterior(playerid, DeadInt[playerid]);
			SetPlayerVirtualWorld(playerid, DeadWorld[playerid]);
			ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
			SetPlayerCameraPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]+5);
			SetPlayerCameraLookAt(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
			JustDied[playerid] = 0;
		    return 1;
		}
		else
		{
		    SetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
		    SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
		    SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVw]);
		}
	}
	if(GetPVarInt(playerid,"BankAccount") == 0)
	{
		new rand = 100000+random(900000), string[64];
		format(string,sizeof(string),"bank/%d.txt",rand);
		while(fexist(string))
		{
		    rand = 100000+random(900000);
			format(string,sizeof(string),"bank/%d.txt",rand);
		}
		SetPVarInt(playerid,"BankAccount",rand);
		CreateBankAccount(playerid,100000+random(900000));
		SavePlayer(playerid);
	}
	PlayerSpawned[playerid] = 1;
	return 1;
}
public StartWide(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		TextDrawShowForPlayer(playerid,lbt);
		TextDrawShowForPlayer(playerid,lbb);
		return 1;
	}
	return 0;
}

public StopWide(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		TextDrawHideForPlayer(playerid,lbt);
		TextDrawHideForPlayer(playerid,lbb);
		return 1;
	}
	return 0;
}

public EmptyMessages(playerid, count)
{
    for (new i = 0; i < count; i++)
    {
		SendClientMessage(playerid, 0, "\n");
	}
}
public LookAtPlane(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(TutTime[playerid] < 43)
		{
  			new Float:x, Float:y, Float:z;
			GetDynamicObjectPos(Plane[playerid], x, y, z);
			SetPlayerInterior(playerid, 0);
			SetPlayerCameraLookAt(playerid, x, y, z);
			SetTimerEx("LookAtPlane",40,false,"i",playerid);
		}
		else
		{
			DestroyDynamicObject(Plane[playerid]);
			SetPlayerCameraPos(playerid, 0.8326,31.3119,1199.5938);
			SetPlayerCameraLookAt(playerid, 2.8315,25.8140,1200.0781);
			SetPlayerInterior(playerid, 1);
			SetPlayerPos(playerid,2.8155,28.6501,1199.5938);
        	SetPlayerFacingAngle(playerid,3.9150);
            ApplyAnimation(playerid,"PED","SEAT_down",4.1,0,0,0,1,1);
		}
	}
	return 1;
}
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
		new string3[512];
		new playername3[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername3, sizeof(playername3));
		format(string3, sizeof(string3), "accounts/%s.ini", playername3);
		new File: hFile = fopen(string3, io_write);
		if (hFile)
		{
		    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
		    new var[32];
			format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);

			format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
			format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
			format(var, 32, "BankAccount=%d\n",GetPVarInt(playerid,"BankAccount"));fwrite(hFile, var);
			format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
			format(var, 32, "MotoLic=%d\n",PlayerInfo[playerid][pMotoLic]);fwrite(hFile, var);
			format(var, 32, "TruckLic=%d\n",PlayerInfo[playerid][pTruckLic]);fwrite(hFile, var);
			format(var, 32, "BusLic=%d\n",PlayerInfo[playerid][pBusLic]);fwrite(hFile, var);
            format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
			format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
			format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
			format(var, 32, "SK=%d\n",PlayerInfo[playerid][pSK]);fwrite(hFile, var);
			format(var, 32, "SD=%d\n",PlayerInfo[playerid][pSD]);fwrite(hFile, var);
			format(var, 32, "TA=%d\n",PlayerInfo[playerid][pTA]);fwrite(hFile, var);
			format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
            format(var, 32, "GunLicAllow=%d\n",PlayerInfo[playerid][pGunLicAllow]);fwrite(hFile, var);
			format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
			format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
			format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
			format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
			format(var, 32, "NeSdal=%d\n",PlayerInfo[playerid][pNeSdal]);fwrite(hFile, var);
			format(var, 32, "Rasa=%d\n",PlayerInfo[playerid][pRasa]);fwrite(hFile, var);
			format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
			format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
			format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
			format(var, 32, "NeedTime=%d\n",PlayerInfo[playerid][pNeedTime]);fwrite(hFile, var);
            format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
            format(var, 32, "English=%d\n",PlayerInfo[playerid][pLangEng]);fwrite(hFile, var);
            format(var, 32, "Japanese=%d\n",PlayerInfo[playerid][pLangJap]);fwrite(hFile, var);
            format(var, 32, "Italliano=%d\n",PlayerInfo[playerid][pLangIta]);fwrite(hFile, var);
            format(var, 32, "Russian=%d\n",PlayerInfo[playerid][pLangRus]);fwrite(hFile, var);
            format(var, 32, "French=%d\n",PlayerInfo[playerid][pLangFra]);fwrite(hFile, var);
            format(var, 32, "WalkStyle=%d\n",PlayerInfo[playerid][pWalkStyle]);fwrite(hFile, var);
			format(var, 32, "Speedo=%d\n",PlayerInfo[playerid][pSpeedo]);fwrite(hFile, var);
            format(var, 32, "FightStyle=%d\n",PlayerInfo[playerid][pFightStyle]);fwrite(hFile, var);
            format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
            format(var, 32, "Polotence=%d\n",PlayerInfo[playerid][pPolotence]);fwrite(hFile, var);
            format(var, 32, "Gun0=%d\n", PlayerGun[playerid][0]);fwrite(hFile, var);
 		    format(var, 32, "Gun1=%d\n", PlayerGun[playerid][1]);fwrite(hFile, var);
			format(var, 32, "Gun2=%d\n", PlayerGun[playerid][2]);fwrite(hFile, var);
			format(var, 32, "Gun3=%d\n", PlayerGun[playerid][3]);fwrite(hFile, var);
			format(var, 32, "Gun4=%d\n", PlayerGun[playerid][4]);fwrite(hFile, var);
			format(var, 32, "Gun5=%d\n", PlayerGun[playerid][5]);fwrite(hFile, var);
			format(var, 32, "Gun6=%d\n", PlayerGun[playerid][6]);fwrite(hFile, var);
			format(var, 32, "Gun7=%d\n", PlayerGun[playerid][7]);fwrite(hFile, var);
			format(var, 32, "Gun8=%d\n", PlayerGun[playerid][8]);fwrite(hFile, var);
			format(var, 32, "Gun9=%d\n", PlayerGun[playerid][9]);fwrite(hFile, var);
			format(var, 32, "Gun10=%d\n", PlayerGun[playerid][10]);fwrite(hFile, var);
			format(var, 32, "Gun11=%d\n", PlayerGun[playerid][11]);fwrite(hFile, var);
			format(var, 32, "Ammo0=%d\n", PlayerAmmo[playerid][0]);fwrite(hFile, var);
			format(var, 32, "Ammo1=%d\n", PlayerAmmo[playerid][1]);fwrite(hFile, var);
			format(var, 32, "Ammo2=%d\n", PlayerAmmo[playerid][2]);fwrite(hFile, var);
			format(var, 32, "Ammo3=%d\n", PlayerAmmo[playerid][3]);fwrite(hFile, var);
			format(var, 32, "Ammo4=%d\n", PlayerAmmo[playerid][4]);fwrite(hFile, var);
			format(var, 32, "Ammo5=%d\n", PlayerAmmo[playerid][5]);fwrite(hFile, var);
			format(var, 32, "Ammo6=%d\n", PlayerAmmo[playerid][6]);fwrite(hFile, var);
			format(var, 32, "Ammo7=%d\n", PlayerAmmo[playerid][7]);fwrite(hFile, var);
			format(var, 32, "Ammo8=%d\n", PlayerAmmo[playerid][8]);fwrite(hFile, var);
			format(var, 32, "Ammo9=%d\n", PlayerAmmo[playerid][9]);fwrite(hFile, var);
			format(var, 32, "Ammo10=%d\n", PlayerAmmo[playerid][10]);fwrite(hFile, var);
			format(var, 32, "Ammo11=%d\n", PlayerAmmo[playerid][11]);fwrite(hFile, var);
			format(var, 32, "Pasport=%d\n", PlayerInfo[playerid][pPasport]);fwrite(hFile, var);
			format(var, 32, "Age=%d\n", PlayerInfo[playerid][pAge]);fwrite(hFile, var);
			new vw = GetPlayerVirtualWorld(playerid);
			new inter = GetPlayerInterior(playerid);
			format(var, 32, "Interior=%d\n",inter);fwrite(hFile, var);
			format(var, 32, "World=%d\n",vw);fwrite(hFile, var);
			format(var, 32, "Mobile=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
			format(var, 32, "ICQ=%d\n",PlayerInfo[playerid][pICQ]);fwrite(hFile, var);
			format(var, 32, "Urojay=%d\n",PlayerInfo[playerid][pUrojay]);fwrite(hFile, var);
			format(var, 32, "Trava=%d\n",PlayerInfo[playerid][pTrava]);fwrite(hFile, var);
			format(var, 32, "Geroin=%d\n",PlayerInfo[playerid][pGeroin]);fwrite(hFile, var);
			format(var, 32, "Moloko=%d\n",PlayerInfo[playerid][pMoloko]);fwrite(hFile, var);
			format(var, 32, "UrojayTyp=%d\n",PlayerInfo[playerid][pUrojayTyp]);fwrite(hFile, var);
			format(var, 32, "Semena=%d\n",PlayerInfo[playerid][pSemena]);fwrite(hFile, var);
			format(var, 32, "SemenaTyp=%d\n",PlayerInfo[playerid][pSemenaTyp]);fwrite(hFile, var);
			format(var, 32, "Injured=%d\n",PlayerInfo[playerid][pInjured]);fwrite(hFile, var);
			format(var, 32, "HospTimeLeft=%d\n",PlayerInfo[playerid][pHospTimeLeft]);fwrite(hFile, var);
			format(var, 32, "Golod=%d\n",GetPVarInt(playerid,"Golod"));fwrite(hFile, var);
			format(var, 32, "GolodTimer=%d\n",GetPVarInt(playerid,"GolodTimer"));fwrite(hFile, var);
			format(var, 32, "Jajda=%d\n",GetPVarInt(playerid,"Jajda"));fwrite(hFile, var);
			format(var, 32, "JajdaTimer=%d\n",GetPVarInt(playerid,"JajdaTimer"));fwrite(hFile, var);
	//		format(var, 32, "Pole=%d\n",PlayerInfo[playerid][pPole]);fwrite(hFile, var);
			//Контакты АйСиКью
			format(var, 32, "ICQc1=%d\n",PlayerInfo[playerid][pICQc1]);fwrite(hFile, var);
			format(var, 32, "ICQc2=%d\n",PlayerInfo[playerid][pICQc2]);fwrite(hFile, var);
			format(var, 32, "ICQc3=%d\n",PlayerInfo[playerid][pICQc3]);fwrite(hFile, var);
			format(var, 32, "ICQc4=%d\n",PlayerInfo[playerid][pICQc4]);fwrite(hFile, var);
			format(var, 32, "ICQc5=%d\n",PlayerInfo[playerid][pICQc5]);fwrite(hFile, var);
			format(var, 32, "ICQc6=%d\n",PlayerInfo[playerid][pICQc6]);fwrite(hFile, var);
			format(var, 32, "ICQc7=%d\n",PlayerInfo[playerid][pICQc7]);fwrite(hFile, var);
			format(var, 32, "ICQc8=%d\n",PlayerInfo[playerid][pICQc8]);fwrite(hFile, var);
			format(var, 32, "ICQc9=%d\n",PlayerInfo[playerid][pICQc9]);fwrite(hFile, var);
			format(var, 32, "ICQc10=%d\n",PlayerInfo[playerid][pICQc10]);fwrite(hFile, var);
			format(var, 32, "ICQc11=%d\n",PlayerInfo[playerid][pICQc11]);fwrite(hFile, var);
			format(var, 32, "ICQc12=%d\n",PlayerInfo[playerid][pICQc12]);fwrite(hFile, var);
			format(var, 32, "ICQc13=%d\n",PlayerInfo[playerid][pICQc13]);fwrite(hFile, var);
			format(var, 32, "ICQc14=%d\n",PlayerInfo[playerid][pICQc14]);fwrite(hFile, var);
			format(var, 32, "ICQc15=%d\n",PlayerInfo[playerid][pICQc15]);fwrite(hFile, var);
			//Имена АйСиКью
			format(var, 32, "ICQn1=%s\n",PlayerInfo[playerid][pICQn1]);fwrite(hFile, var);
			format(var, 32, "ICQn2=%s\n",PlayerInfo[playerid][pICQn2]);fwrite(hFile, var);
			format(var, 32, "ICQn3=%s\n",PlayerInfo[playerid][pICQn3]);fwrite(hFile, var);
			format(var, 32, "ICQn4=%s\n",PlayerInfo[playerid][pICQn4]);fwrite(hFile, var);
			format(var, 32, "ICQn5=%s\n",PlayerInfo[playerid][pICQn5]);fwrite(hFile, var);
			format(var, 32, "ICQn6=%s\n",PlayerInfo[playerid][pICQn6]);fwrite(hFile, var);
			format(var, 32, "ICQn7=%s\n",PlayerInfo[playerid][pICQn7]);fwrite(hFile, var);
			format(var, 32, "ICQn8=%s\n",PlayerInfo[playerid][pICQn8]);fwrite(hFile, var);
			format(var, 32, "ICQn9=%s\n",PlayerInfo[playerid][pICQn9]);fwrite(hFile, var);
			format(var, 32, "ICQn10=%s\n",PlayerInfo[playerid][pICQn10]);fwrite(hFile, var);
			format(var, 32, "ICQn11=%s\n",PlayerInfo[playerid][pICQn11]);fwrite(hFile, var);
			format(var, 32, "ICQn12=%s\n",PlayerInfo[playerid][pICQn12]);fwrite(hFile, var);
			format(var, 32, "ICQn13=%s\n",PlayerInfo[playerid][pICQn13]);fwrite(hFile, var);
			format(var, 32, "ICQn14=%s\n",PlayerInfo[playerid][pICQn14]);fwrite(hFile, var);
			format(var, 32, "ICQn15=%s\n",PlayerInfo[playerid][pICQn15]);fwrite(hFile, var);
			//Объекты
			format(var, 32, "Object1=%d\n",PlayerObjects[playerid][0]);fwrite(hFile, var);
			format(var, 32, "Object2=%d\n",PlayerObjects[playerid][1]);fwrite(hFile, var);
			format(var, 32, "Object3=%d\n",PlayerObjects[playerid][2]);fwrite(hFile, var);
			format(var, 32, "Object4=%d\n",PlayerObjects[playerid][3]);fwrite(hFile, var);
			format(var, 32, "Object5=%d\n",PlayerObjects[playerid][4]);fwrite(hFile, var);
			format(var, 32, "Object6=%d\n",PlayerObjects[playerid][5]);fwrite(hFile, var);
			format(var, 32, "Object7=%d\n",PlayerObjects[playerid][6]);fwrite(hFile, var);
			format(var, 32, "Object8=%d\n",PlayerObjects[playerid][7]);fwrite(hFile, var);
			format(var, 32, "Object9=%d\n",PlayerObjects[playerid][8]);fwrite(hFile, var);
			format(var, 32, "Object10=%d\n",PlayerObjects[playerid][9]);fwrite(hFile, var);
			format(var, 32, "Object11=%d\n",PlayerObjects[playerid][10]);fwrite(hFile, var);
			format(var, 32, "Object12=%d\n",PlayerObjects[playerid][11]);fwrite(hFile, var);
			format(var, 32, "Object13=%d\n",PlayerObjects[playerid][12]);fwrite(hFile, var);
			format(var, 32, "Object14=%d\n",PlayerObjects[playerid][13]);fwrite(hFile, var);
			format(var, 32, "Object15=%d\n",PlayerObjects[playerid][14]);fwrite(hFile, var);
			//Для писем
			format(var, 32, "Paper=%d\n",PlayerInfo[playerid][pPaper]);fwrite(hFile, var);
			format(var, 32, "Envelope=%d\n",PlayerInfo[playerid][pEnvelope]);fwrite(hFile, var);
			format(var, 32, "Pen=%d\n",PlayerInfo[playerid][pPen]);fwrite(hFile, var);
			format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
			format(var, 32, "RentHouse=%d\n",PlayerInfo[playerid][pRentHouse]);fwrite(hFile, var);
			format(var, 32, "RentHousePrice=%d\n",PlayerInfo[playerid][pRentHousePrice]);fwrite(hFile, var);
			for(new id = 0; id < MAX_PLAYER_LETTERS; id++)
			{
				format(var, 32, "Letter%d=%d\n",id+1,PlayerLetters[playerid][id]);fwrite(hFile, var);
			}
 			fclose(hFile);
 			if(PlayerLogged[playerid] == 0)
 			{
	 			if(PlayerLang[playerid] == 1)
	 			SendClientMessage(playerid,COLOR_WHITE,"Регистрация прошла успешно. Автоматическая авторизация...");
	 			else
	 			SendClientMessage(playerid,COLOR_WHITE,"Registration succesfully. Authorization...");
			   	OnPlayerLogin(playerid,PlayerInfo[playerid][pKey]);
			}
 		}
	}
	return 1;
}

public SavePlayer(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(PlayerLogged[playerid] && !IsPlayerNPC(playerid))
		{
   			new string3[512];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "accounts/%s.ini", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
				new var[32];
				format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
				format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
				format(var, 32, "BankAccount=%d\n",GetPVarInt(playerid,"BankAccount"));fwrite(hFile, var);
				format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
				new Float:x,Float:y,Float:z;
				GetPlayerPos(playerid,x,y,z);
				format(var, 32, "Pos_x=%f\n",x);fwrite(hFile, var);
				format(var, 32, "Pos_y=%f\n",y);fwrite(hFile, var);
				format(var, 32, "Pos_z=%f\n",z);fwrite(hFile, var);
				new vw = GetPlayerVirtualWorld(playerid);
				new inter = GetPlayerInterior(playerid);
				format(var, 32, "Interior=%d\n",inter);fwrite(hFile, var);
				format(var, 32, "World=%d\n",vw);fwrite(hFile, var);
				format(var, 32, "TA=%d\n",PlayerInfo[playerid][pTA]);fwrite(hFile, var);
				format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
				format(var, 32, "MotoLic=%d\n",PlayerInfo[playerid][pMotoLic]);fwrite(hFile, var);
				format(var, 32, "TruckLic=%d\n",PlayerInfo[playerid][pTruckLic]);fwrite(hFile, var);
				format(var, 32, "BusLic=%d\n",PlayerInfo[playerid][pBusLic]);fwrite(hFile, var);
				format(var, 32, "NeSdal=%d\n",PlayerInfo[playerid][pNeSdal]);fwrite(hFile, var);
                format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
				format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
				format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
				format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
                format(var, 32, "GunLicAllow=%d\n",PlayerInfo[playerid][pGunLicAllow]);fwrite(hFile, var);
				format(var, 32, "Rasa=%d\n",PlayerInfo[playerid][pRasa]);fwrite(hFile, var);
				format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
				format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
				format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
				format(var, 32, "NeedTime=%d\n",PlayerInfo[playerid][pNeedTime]);fwrite(hFile, var);
				format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
				format(var, 32, "English=%d\n",PlayerInfo[playerid][pLangEng]);fwrite(hFile, var);
	            format(var, 32, "Japanese=%d\n",PlayerInfo[playerid][pLangJap]);fwrite(hFile, var);
	            format(var, 32, "Italliano=%d\n",PlayerInfo[playerid][pLangIta]);fwrite(hFile, var);
	            format(var, 32, "Russian=%d\n",PlayerInfo[playerid][pLangRus]);fwrite(hFile, var);
	            format(var, 32, "French=%d\n",PlayerInfo[playerid][pLangFra]);fwrite(hFile, var);
				format(var, 32, "Speedo=%d\n",PlayerInfo[playerid][pSpeedo]);fwrite(hFile, var);
	            format(var, 32, "WalkStyle=%d\n",PlayerInfo[playerid][pWalkStyle]);fwrite(hFile, var);
	            format(var, 32, "FightStyle=%d\n",PlayerInfo[playerid][pFightStyle]);fwrite(hFile, var);
	            format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
	            format(var, 32, "Polotence=%d\n",PlayerInfo[playerid][pPolotence]);fwrite(hFile, var);
	            format(var, 32, "Gun0=%d\n", PlayerGun[playerid][0]);fwrite(hFile, var);
	 		    format(var, 32, "Gun1=%d\n", PlayerGun[playerid][1]);fwrite(hFile, var);
				format(var, 32, "Gun2=%d\n", PlayerGun[playerid][2]);fwrite(hFile, var);
				format(var, 32, "Gun3=%d\n", PlayerGun[playerid][3]);fwrite(hFile, var);
				format(var, 32, "Gun4=%d\n", PlayerGun[playerid][4]);fwrite(hFile, var);
				format(var, 32, "Gun5=%d\n", PlayerGun[playerid][5]);fwrite(hFile, var);
				format(var, 32, "Gun6=%d\n", PlayerGun[playerid][6]);fwrite(hFile, var);
				format(var, 32, "Gun7=%d\n", PlayerGun[playerid][7]);fwrite(hFile, var);
				format(var, 32, "Gun8=%d\n", PlayerGun[playerid][8]);fwrite(hFile, var);
				format(var, 32, "Gun9=%d\n", PlayerGun[playerid][9]);fwrite(hFile, var);
				format(var, 32, "Gun10=%d\n", PlayerGun[playerid][10]);fwrite(hFile, var);
				format(var, 32, "Gun11=%d\n", PlayerGun[playerid][11]);fwrite(hFile, var);
				format(var, 32, "Ammo0=%d\n", PlayerAmmo[playerid][0]);fwrite(hFile, var);
				format(var, 32, "Ammo1=%d\n", PlayerAmmo[playerid][1]);fwrite(hFile, var);
				format(var, 32, "Ammo2=%d\n", PlayerAmmo[playerid][2]);fwrite(hFile, var);
				format(var, 32, "Ammo3=%d\n", PlayerAmmo[playerid][3]);fwrite(hFile, var);
				format(var, 32, "Ammo4=%d\n", PlayerAmmo[playerid][4]);fwrite(hFile, var);
				format(var, 32, "Ammo5=%d\n", PlayerAmmo[playerid][5]);fwrite(hFile, var);
				format(var, 32, "Ammo6=%d\n", PlayerAmmo[playerid][6]);fwrite(hFile, var);
				format(var, 32, "Ammo7=%d\n", PlayerAmmo[playerid][7]);fwrite(hFile, var);
				format(var, 32, "Ammo8=%d\n", PlayerAmmo[playerid][8]);fwrite(hFile, var);
				format(var, 32, "Ammo9=%d\n", PlayerAmmo[playerid][9]);fwrite(hFile, var);
				format(var, 32, "Ammo10=%d\n", PlayerAmmo[playerid][10]);fwrite(hFile, var);
				format(var, 32, "Ammo11=%d\n", PlayerAmmo[playerid][11]);fwrite(hFile, var);
				format(var, 32, "Pasport=%d\n", PlayerInfo[playerid][pPasport]);fwrite(hFile, var);
				format(var, 32, "Age=%d\n", PlayerInfo[playerid][pAge]);fwrite(hFile, var);
				format(var, 32, "Mobile=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
				format(var, 32, "ICQ=%d\n",PlayerInfo[playerid][pICQ]);fwrite(hFile, var);
				format(var, 32, "Urojay=%d\n",PlayerInfo[playerid][pUrojay]);fwrite(hFile, var);
				format(var, 32, "Trava=%d\n",PlayerInfo[playerid][pTrava]);fwrite(hFile, var);
				format(var, 32, "Geroin=%d\n",PlayerInfo[playerid][pGeroin]);fwrite(hFile, var);
				format(var, 32, "Moloko=%d\n",PlayerInfo[playerid][pMoloko]);fwrite(hFile, var);
				format(var, 32, "UrojayTyp=%d\n",PlayerInfo[playerid][pUrojayTyp]);fwrite(hFile, var);
				format(var, 32, "Semena=%d\n",PlayerInfo[playerid][pSemena]);fwrite(hFile, var);
				format(var, 32, "SemenaTyp=%d\n",PlayerInfo[playerid][pSemenaTyp]);fwrite(hFile, var);
				format(var, 32, "Injured=%d\n",PlayerInfo[playerid][pInjured]);fwrite(hFile, var);
				format(var, 32, "HospTimeLeft=%d\n",PlayerInfo[playerid][pHospTimeLeft]);fwrite(hFile, var);
				format(var, 32, "Golod=%d\n",GetPVarInt(playerid,"Golod"));fwrite(hFile, var);
				format(var, 32, "GolodTimer=%d\n",GetPVarInt(playerid,"GolodTimer"));fwrite(hFile, var);
				format(var, 32, "Jajda=%d\n",GetPVarInt(playerid,"Jajda"));fwrite(hFile, var);
				format(var, 32, "JajdaTimer=%d\n",GetPVarInt(playerid,"JajdaTimer"));fwrite(hFile, var);
			//	format(var, 32, "Pole=%d\n",PlayerInfo[playerid][pPole]);fwrite(hFile, var);
				//Контакты АйСиКью
				format(var, 32, "ICQc1=%d\n",PlayerInfo[playerid][pICQc1]);fwrite(hFile, var);
				format(var, 32, "ICQc2=%d\n",PlayerInfo[playerid][pICQc2]);fwrite(hFile, var);
				format(var, 32, "ICQc3=%d\n",PlayerInfo[playerid][pICQc3]);fwrite(hFile, var);
				format(var, 32, "ICQc4=%d\n",PlayerInfo[playerid][pICQc4]);fwrite(hFile, var);
				format(var, 32, "ICQc5=%d\n",PlayerInfo[playerid][pICQc5]);fwrite(hFile, var);
				format(var, 32, "ICQc6=%d\n",PlayerInfo[playerid][pICQc6]);fwrite(hFile, var);
				format(var, 32, "ICQc7=%d\n",PlayerInfo[playerid][pICQc7]);fwrite(hFile, var);
				format(var, 32, "ICQc8=%d\n",PlayerInfo[playerid][pICQc8]);fwrite(hFile, var);
				format(var, 32, "ICQc9=%d\n",PlayerInfo[playerid][pICQc9]);fwrite(hFile, var);
				format(var, 32, "ICQc10=%d\n",PlayerInfo[playerid][pICQc10]);fwrite(hFile, var);
				format(var, 32, "ICQc11=%d\n",PlayerInfo[playerid][pICQc11]);fwrite(hFile, var);
				format(var, 32, "ICQc12=%d\n",PlayerInfo[playerid][pICQc12]);fwrite(hFile, var);
				format(var, 32, "ICQc13=%d\n",PlayerInfo[playerid][pICQc13]);fwrite(hFile, var);
				format(var, 32, "ICQc14=%d\n",PlayerInfo[playerid][pICQc14]);fwrite(hFile, var);
				format(var, 32, "ICQc15=%d\n",PlayerInfo[playerid][pICQc15]);fwrite(hFile, var);
				//Имена АйСиКью
				format(var, 32, "ICQn1=%s",PlayerInfo[playerid][pICQn1]);fwrite(hFile, var);
				format(var, 32, "ICQn2=%s",PlayerInfo[playerid][pICQn2]);fwrite(hFile, var);
				format(var, 32, "ICQn3=%s",PlayerInfo[playerid][pICQn3]);fwrite(hFile, var);
				format(var, 32, "ICQn4=%s",PlayerInfo[playerid][pICQn4]);fwrite(hFile, var);
				format(var, 32, "ICQn5=%s",PlayerInfo[playerid][pICQn5]);fwrite(hFile, var);
				format(var, 32, "ICQn6=%s",PlayerInfo[playerid][pICQn6]);fwrite(hFile, var);
				format(var, 32, "ICQn7=%s",PlayerInfo[playerid][pICQn7]);fwrite(hFile, var);
				format(var, 32, "ICQn8=%s",PlayerInfo[playerid][pICQn8]);fwrite(hFile, var);
				format(var, 32, "ICQn9=%s",PlayerInfo[playerid][pICQn9]);fwrite(hFile, var);
				format(var, 32, "ICQn10=%s",PlayerInfo[playerid][pICQn10]);fwrite(hFile, var);
				format(var, 32, "ICQn11=%s",PlayerInfo[playerid][pICQn11]);fwrite(hFile, var);
				format(var, 32, "ICQn12=%s",PlayerInfo[playerid][pICQn12]);fwrite(hFile, var);
				format(var, 32, "ICQn13=%s",PlayerInfo[playerid][pICQn13]);fwrite(hFile, var);
				format(var, 32, "ICQn14=%s",PlayerInfo[playerid][pICQn14]);fwrite(hFile, var);
				format(var, 32, "ICQn15=%s",PlayerInfo[playerid][pICQn15]);fwrite(hFile, var);
				//Объекты
				format(var, 32, "Object1=%d\n",PlayerObjects[playerid][0]);fwrite(hFile, var);
				format(var, 32, "Object2=%d\n",PlayerObjects[playerid][1]);fwrite(hFile, var);
				format(var, 32, "Object3=%d\n",PlayerObjects[playerid][2]);fwrite(hFile, var);
				format(var, 32, "Object4=%d\n",PlayerObjects[playerid][3]);fwrite(hFile, var);
				format(var, 32, "Object5=%d\n",PlayerObjects[playerid][4]);fwrite(hFile, var);
				format(var, 32, "Object6=%d\n",PlayerObjects[playerid][5]);fwrite(hFile, var);
				format(var, 32, "Object7=%d\n",PlayerObjects[playerid][6]);fwrite(hFile, var);
				format(var, 32, "Object8=%d\n",PlayerObjects[playerid][7]);fwrite(hFile, var);
				format(var, 32, "Object9=%d\n",PlayerObjects[playerid][8]);fwrite(hFile, var);
				format(var, 32, "Object10=%d\n",PlayerObjects[playerid][9]);fwrite(hFile, var);
				format(var, 32, "Object11=%d\n",PlayerObjects[playerid][10]);fwrite(hFile, var);
				format(var, 32, "Object12=%d\n",PlayerObjects[playerid][11]);fwrite(hFile, var);
				format(var, 32, "Object13=%d\n",PlayerObjects[playerid][12]);fwrite(hFile, var);
				format(var, 32, "Object14=%d\n",PlayerObjects[playerid][13]);fwrite(hFile, var);
				format(var, 32, "Object15=%d\n",PlayerObjects[playerid][14]);fwrite(hFile, var);
				//Для писем
				format(var, 32, "Paper=%d\n",PlayerInfo[playerid][pPaper]);fwrite(hFile, var);
				format(var, 32, "Envelope=%d\n",PlayerInfo[playerid][pEnvelope]);fwrite(hFile, var);
				format(var, 32, "Pen=%d\n",PlayerInfo[playerid][pPen]);fwrite(hFile, var);
				format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				for(new id = 0; id < MAX_PLAYER_LETTERS; id++)
				{
					format(var, 32, "Letter%d=%d\n",id+1,PlayerLetters[playerid][id]);fwrite(hFile, var);
				}
				fclose(hFile);
			}
		}
	}
 	return 1;
}
public OnPlayerLogin(playerid,password[])
{
    new string2[512];
	new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
	format(string2, sizeof(string2), "accounts/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	if ( UserFile )
	{
	    new PassData[256];
	    new keytmp[256], valtmp[256];
	    fread( UserFile , PassData , sizeof( PassData ) );
	    keytmp = ini_GetKey( PassData );
	    if( strcmp( keytmp , "Key" , true ) == 0 )
		{
			valtmp = ini_GetValue( PassData );
			strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);

		}
		if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
		{
			    new key[ 256 ] , val[ 256 ];
			    new Data[ 256 ];
			    while ( fread( UserFile , Data , sizeof( Data ) ) )
				{
					key = ini_GetKey( Data );
					if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
			    	if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
			    	if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val );  }
			    	if( strcmp( key , "BankAccount" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid,"BankAccount",strval( val )); }
                    if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
			        if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
			        if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
			        if( strcmp( key , "Interior" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
			        if( strcmp( key , "World" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVw] = strval( val ); }
				    if( strcmp( key , "Rasa" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRasa] = strval( val ); }
			        if( strcmp( key , "Skin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSkin] = strval( val ); }
					if( strcmp( key , "SD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSD] = strval( val ); }
					if( strcmp( key , "SK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSK] = strval( val ); }
			        if( strcmp( key , "TA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTA] = strval( val ); }
			        if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
			        if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
			        if( strcmp( key , "NeedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNeedTime] = strval( val ); }
			        if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
                    if( strcmp( key , "NeSdal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNeSdal] = strval( val ); }
					if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
			        if( strcmp( key , "MotoLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMotoLic] = strval( val ); }
			        if( strcmp( key , "TruckLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckLic] = strval( val ); }
			        if( strcmp( key , "BusLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBusLic] = strval( val ); }
                    if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
					if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
			        if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
     				if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
                    if( strcmp( key , "GunLicAllow" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLicAllow] = strval( val ); }
					if( strcmp( key , "English" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangEng] = strval( val ); }
			        if( strcmp( key , "Japanese" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangJap] = strval( val ); }
			        if( strcmp( key , "Italliano" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangIta] = strval( val ); }
			        if( strcmp( key , "Russian" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangRus] = strval( val ); }
			        if( strcmp( key , "French" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangFra] = strval( val ); }
					if( strcmp( key , "Speedo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpeedo] = strval( val ); }
			        if( strcmp( key , "WalkStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWalkStyle] = strval( val ); }
			        if( strcmp( key , "FightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFightStyle] = strval( val ); }
			        if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
			        if( strcmp( key , "Polotence" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPolotence] = strval( val ); }
                    if( strcmp( key , "Gun0" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][0] = strval( val ); }
					if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][1] = strval( val ); }
			        if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][2] = strval( val ); }
			        if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][3] = strval( val ); }
			        if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][4] = strval( val ); }
					if( strcmp( key , "Gun5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][5] = strval( val ); }
					if( strcmp( key , "Gun6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][6] = strval( val ); }
					if( strcmp( key , "Gun7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][7] = strval( val ); }
					if( strcmp( key , "Gun8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][8] = strval( val ); }
					if( strcmp( key , "Gun9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][9] = strval( val ); }
					if( strcmp( key , "Gun10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][10] = strval( val ); }
					if( strcmp( key , "Gun11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerGun[playerid][11] = strval( val ); }
					if( strcmp( key , "Ammo0" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][0] = strval( val ); }
				    if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][1] = strval( val ); }
			        if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][2] = strval( val ); }
			        if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][3] = strval( val ); }
			        if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][4] = strval( val ); }
			        if( strcmp( key , "Ammo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][5] = strval( val ); }
			        if( strcmp( key , "Ammo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][6] = strval( val ); }
			        if( strcmp( key , "Ammo7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][7] = strval( val ); }
			        if( strcmp( key , "Ammo8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][8] = strval( val ); }
			        if( strcmp( key , "Ammo9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][9] = strval( val ); }
			        if( strcmp( key , "Ammo10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][10] = strval( val ); }
			        if( strcmp( key , "Ammo11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerAmmo[playerid][11] = strval( val ); }
			        if( strcmp( key , "Pasport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPasport] = strval( val ); }
			        if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
                    if( strcmp( key , "ICQ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQ] = strval( val ); }
                    if( strcmp( key , "Mobile" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
                    if( strcmp( key , "Urojay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUrojay] = strval( val ); }
                    if( strcmp( key , "Trava" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTrava] = strval( val ); }
                    if( strcmp( key , "Geroin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGeroin] = strval( val ); }
                    if( strcmp( key , "Moloko" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGeroin] = strval( val ); }
				    if( strcmp( key , "UrojayTyp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUrojayTyp] = strval( val ); }
	                if( strcmp( key , "Semena" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSemena] = strval( val ); }
				    if( strcmp( key , "SemenaTyp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSemenaTyp] = strval( val ); }
				    if( strcmp( key , "Injured" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInjured] = strval( val ); }
				    if( strcmp( key , "HospTimeLeft" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHospTimeLeft] = strval( val ); }
					if( strcmp( key , "Golod" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid,"Golod",strval(val)); }
					if( strcmp( key , "GolodTimer" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid,"GolodTimer",strval(val)); }
					if( strcmp( key , "Jajda" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid,"Jajda",strval(val)); }
					if( strcmp( key , "JajdaTimer" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid,"JajdaTimer",strval(val)); }
	       		//	if( strcmp( key , "Pole" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPole] = strval( val ); }
				    //Контакты АйСиКью
                    if( strcmp( key , "ICQc1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc1] = strval( val ); }
                    if( strcmp( key , "ICQc2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc2] = strval( val ); }
                    if( strcmp( key , "ICQc3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc3] = strval( val ); }
                    if( strcmp( key , "ICQc4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc4] = strval( val ); }
                    if( strcmp( key , "ICQc5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc5] = strval( val ); }
                    if( strcmp( key , "ICQc6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc6] = strval( val ); }
                    if( strcmp( key , "ICQc7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc7] = strval( val ); }
                    if( strcmp( key , "ICQc8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc8] = strval( val ); }
                    if( strcmp( key , "ICQc9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc9] = strval( val ); }
                    if( strcmp( key , "ICQc10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc10] = strval( val ); }
                    if( strcmp( key , "ICQc11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc11] = strval( val ); }
                    if( strcmp( key , "ICQc12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc12] = strval( val ); }
                    if( strcmp( key , "ICQc13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc13] = strval( val ); }
                    if( strcmp( key , "ICQc14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc14] = strval( val ); }
                    if( strcmp( key , "ICQc15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pICQc15] = strval( val ); }
					//Имена АйСиКью
					if( strcmp( key , "ICQn1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn1],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn2],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn3],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn4],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn5],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn6],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn7],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn8],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn9],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn10" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn10],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn11" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn11],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn12" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn12],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn13" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn13],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn14" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn14],val,0,strlen(val),32); }
					if( strcmp( key , "ICQn15" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pICQn15],val,0,strlen(val),32); }
					//Купленные объекты
					if( strcmp( key , "Object1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][0] = strval( val ); }
                    if( strcmp( key , "Object2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][1] = strval( val ); }
                    if( strcmp( key , "Object3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][2] = strval( val ); }
                    if( strcmp( key , "Object4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][3] = strval( val ); }
                    if( strcmp( key , "Object5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][4] = strval( val ); }
                    if( strcmp( key , "Object6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][5] = strval( val ); }
                    if( strcmp( key , "Object7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][6] = strval( val ); }
                    if( strcmp( key , "Object8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][7] = strval( val ); }
                    if( strcmp( key , "Object9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][8] = strval( val ); }
                    if( strcmp( key , "Object10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][9] = strval( val ); }
                    if( strcmp( key , "Object11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][10] = strval( val ); }
                    if( strcmp( key , "Object12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][11] = strval( val ); }
                    if( strcmp( key , "Object13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][12] = strval( val ); }
                    if( strcmp( key , "Object14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][13] = strval( val ); }
                    if( strcmp( key , "Object15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerObjects[playerid][14] = strval( val ); }
					//Для писем
				    if( strcmp( key , "Paper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPaper] = strval( val ); }
                    if( strcmp( key , "Envelope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pEnvelope] = strval( val ); }
                    if( strcmp( key , "Pen" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPen] = strval( val ); }
                    if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
                    if( strcmp( key , "RentHouse" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRentHouse] = strval( val ); }
                    if( strcmp( key , "RentHousePrice" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRentHousePrice] = strval( val ); }
				    for(new id = 0; id < MAX_PLAYER_LETTERS; id++)
					{
						new temp[12];
						format(temp,sizeof(temp),"Letter%d",id+1);
                        if( strcmp( key , temp , true ) == 0 ) { val = ini_GetValue( Data ); PlayerLetters[playerid][id] = strval( val ); }
					}
				}
                fclose(UserFile);
                PlayerLogged[playerid] = 1;
             /*   new gotit = 0;
                for(new i = 0; i < ACCOUNTS; i ++)
                {
                    if(!strcmp(playername2,AccountInfo[i][aPlayerName],false))
                    {
                        gotit = 1;
                    }
                }
                if(gotit == 0)
                {
                    ACCOUNTS ++;
					strmid(AccountInfo[ACCOUNTS-1][aPlayerName], playername2, 0, strlen(playername2), 255);
					new ip[32];
					GetPlayerIp(playerid,ip,sizeof(ip));
					strmid(AccountInfo[ACCOUNTS-1][aPlayerIP], ip, 0, strlen(ip), 255);
					SaveAcs();
					SaveStuff();
                }*/
  		}
		else
    	{
    	    if(PlayerLang[playerid] == 1)
            SendClientMessage(playerid, COLOR_WHITE, "*Пароль неверный.");
            else
            SendClientMessage(playerid, COLOR_WHITE, "*Wrong password.");
		    new loginname[64];
		    GetPlayerName(playerid,loginname,sizeof(loginname));
		    if(PlayerLang[playerid] == 1)
		    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Вход [Cream Life]","Ошибка\nВведи верный пароль:","Войти","Войти");
		    else
		    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login [Cream Life]","Wrong Password\nEnter your password:","Ok","Ok");
		    fclose(UserFile);
		    PlayerLogTries[playerid] += 1;
		    if(PlayerLogTries[playerid] == 4) { Ban(playerid); }
		    return 1;
    	}
    	if(PlayerLang[playerid] == 1)
        {
			SendClientMessage(playerid,COLOR_WHITE,"Вы успешно авторизовались");
            if(PlayerInfo[playerid][pTut] == 0)
            ShowPlayerDialog(playerid,28,DIALOG_STYLE_MSGBOX,"","Вы готовы приступить к созданию персонажа","Ок","Отмена");
		    else
		    SendClientMessage(playerid,COLOR_WHITE,"Нажмите 'Spawn', когда вы будете готовы к игре");
		}
		else
		{
		    SendClientMessage(playerid,COLOR_WHITE,"You are logged in");
		    if(PlayerInfo[playerid][pTut] != 0)
	        SendClientMessage(playerid,COLOR_WHITE,"Press 'Spawn', if you ready to play");
	        else
	        ShowPlayerDialog(playerid,28,DIALOG_STYLE_MSGBOX,"","You are ready to create your charachter","Ok","Cancel");
		}
		ResetPlayerMoney(playerid);
		GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
	}
	return 1;
}
public OnPlayerEnterFood(playerid, foodid)
{
	switch (foodid)
	{
		case 1: // chicken
		{
			SetPlayerInterior(playerid, 9);
			SetPlayerPos(playerid,365.0357,-8.9379,1001.8516);
			SetPlayerFacingAngle(playerid, 313.5263);
			SetPlayerCheckpoint(playerid, 368.9714,-6.2486,1001.8516, 1.5);
			GameTextForPlayer(playerid, "~w~Cluckin Bell", 5000, 1);
			InAFoodPlace[playerid] = 1;
		}
		case 2: // burger
		{
			SetPlayerInterior(playerid, 10);
			SetPlayerPos(playerid,365.7509,-73.7914,1001.5078);
			SetPlayerFacingAngle(playerid, 295.2733);
			SetPlayerCheckpoint(playerid, 376.8571,-67.6620,1001.5151, 1.5);
			GameTextForPlayer(playerid, "~w~Burger Shot", 5000, 1);
			InAFoodPlace[playerid] = 2;
		}
		case 3: // pizza
		{
			SetPlayerInterior(playerid, 5);
			SetPlayerPos(playerid,371.5040,-131.0979,1001.4922);
			SetPlayerFacingAngle(playerid, 0.2733);
			SetPlayerCheckpoint(playerid, 375.6895,-118.9683,1001.4995, 1.5);
			GameTextForPlayer(playerid, "~w~Well Stacked Pizza", 5000, 1);
			InAFoodPlace[playerid] = 3;
		}
		case 4: // donuts
		{
			SetPlayerInterior(playerid, 17);
			SetPlayerPos(playerid,378.2569,-191.5986,1000.6328);
			SetPlayerFacingAngle(playerid, 359.8999);
			SetPlayerCheckpoint(playerid, 379.1519,-186.7224,1000.6328, 1.5);
			GameTextForPlayer(playerid, "~w~Rusty Brown's Donuts", 5000, 1);
			InAFoodPlace[playerid] = 4;
		}
	}
	return 1;
}
public OnPlayerExitShop(playerid)
{
	SetPlayerInterior(playerid,0);
	SetPlayerVirtualWorld(playerid, 0);
	return 1;
}
public OnPlayerEnterShop(playerid, shopid)
{
	switch (shopid)
	{
		case 1: // small
		{
			SetPlayerInterior(playerid, 18);
			SetPlayerPos(playerid,-33.3613,-90.8960,1003.5469);
			SetPlayerFacingAngle(playerid, 326.8363);
			GameTextForPlayer(playerid, "~w~24/7", 5000, 1);
		}
		case 2: // medium
		{
			SetPlayerInterior(playerid, 6);
			SetPlayerPos(playerid,-28.7164,-56.0321,1003.5469);
			SetPlayerFacingAngle(playerid, 285.1360);
			GameTextForPlayer(playerid, "~w~24/7", 5000, 1);
		}
	}
	return 1;
}
public OnPlayerExitCloth(playerid)
{
	DisablePlayerCheckpoint(playerid);
	PlayerInCloth[playerid] = 0;
	SetPlayerInterior(playerid,0);
	SetPlayerVirtualWorld(playerid, 0);
	return 1;
}
public OnPlayerEnterCloth(playerid, clothid)
{
	switch (clothid)
	{
		case 1: // Binco
		{
			SetPlayerInterior(playerid, 15);
			SetPlayerPos(playerid,207.5219,-109.7448,1005.8516);
			SetPlayerFacingAngle(playerid, 0.0);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Binco", 5000, 1);
			SetPlayerCheckpoint(playerid, 207.6342,-100.4955,1005.2578, 1.0);
			PlayerInCloth[playerid] = 1;
		}
		case 2: // Victim
		{
			SetPlayerInterior(playerid, 5);
			SetPlayerPos(playerid, 225.1047,-7.9595,1002.2109 );
			SetPlayerFacingAngle(playerid, 91.7970);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Victim", 5000, 1);
			SetPlayerCheckpoint(playerid, 209.5104,-8.3012,1005.2109, 1.0);
			PlayerInCloth[playerid] = 2;
		}
		case 3: // Sub Urban
		{
			SetPlayerInterior(playerid, 1);
			SetPlayerPos(playerid,203.7780,-48.4924,1001.8047);
			SetPlayerFacingAngle(playerid, 0.0);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Sub Urban", 5000, 1);
			SetPlayerCheckpoint(playerid, 203.9001,-43.5563,1001.8047, 1.0);
			PlayerInCloth[playerid] = 3;
		}
		case 4: // Zip
		{
			SetPlayerInterior(playerid, 18);
			SetPlayerPos(playerid,161.4048,-94.2416,1001.4922);
			SetPlayerFacingAngle(playerid, 0.0);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Zip", 5000, 1);
			PlayerInCloth[playerid] = 4;
		}
		case 5: // Pro Laps
		{
			SetPlayerInterior(playerid, 3);
			SetPlayerPos(playerid,207.0564,-138.8052,1003.5078);
			SetPlayerFacingAngle(playerid, 0.0);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Pro Laps", 5000, 1);
			PlayerInCloth[playerid] = 5;
		}
		case 6: // Dider Sash
		{
			SetPlayerInterior(playerid, 14);
			SetPlayerPos(playerid, 204.3330,-166.6950,1000.5234 );
			SetPlayerFacingAngle(playerid, 0.0);
			SetCameraBehindPlayer(playerid);
			GameTextForPlayer(playerid, "~w~Dider Sash", 5000, 1);
			SetPlayerCheckpoint(playerid, 204.2387,-159.4551,1000.5234, 1.0);
			PlayerInCloth[playerid] = 6;
		}
	}
	return 1;
}
public OnPlayerExitFood(playerid)
{
	DisablePlayerCheckpoint(playerid);
	InAFoodPlace[playerid] = 0;
	SetPlayerInterior(playerid,0);
	SetPlayerVirtualWorld(playerid, 0);
	return 1;
}
public ServerGivePlayerWeapons(playerid,weaponid,ammo)
{
    PyxiTime[playerid] = 5;
	if(weaponid == 1)
	{
	    PlayerGun[playerid][0] = weaponid;
	    PlayerAmmo[playerid][0] = 1;
	}
	else if(IsAMelee(weaponid))
	{
	    PlayerGun[playerid][1] = weaponid;
	    PlayerAmmo[playerid][1] = 1;
	}
	else if(IsAPistol(weaponid))
	{
	    PlayerGun[playerid][2] = weaponid;
	    PlayerAmmo[playerid][2] += ammo;
	}
	else if(IsAShotgun(weaponid))
	{
	    PlayerGun[playerid][3] = weaponid;
	    PlayerAmmo[playerid][3] += ammo;
	}
	else if(IsAMachineGun(weaponid))
	{
	    PlayerGun[playerid][4] = weaponid;
	    PlayerAmmo[playerid][4] += ammo;
	}
	else if(IsAnAssault(weaponid))
	{
	    PlayerGun[playerid][5] = weaponid;
	    PlayerAmmo[playerid][5] += ammo;
	}
	else if(IsARifle(weaponid))
	{
	    PlayerGun[playerid][6] = weaponid;
	    PlayerAmmo[playerid][6] += ammo;
	}
	else if(IsAHeavyAssault(weaponid))
	{
	    PlayerGun[playerid][7] = weaponid;
	    PlayerAmmo[playerid][7] += ammo;
	}
	else if(IsAGrenade(weaponid))
	{
	    PlayerGun[playerid][8] = weaponid;
	    PlayerAmmo[playerid][8] += ammo;
	}
	else if(IsAStuff1(weaponid))
	{
	    PlayerGun[playerid][9] = weaponid;
	    PlayerAmmo[playerid][9] += ammo;
	}
	else if(IsAGirlsStuff(weaponid))
	{
	    PlayerGun[playerid][10] = weaponid;
	    PlayerAmmo[playerid][10] = 1;
	}
	else if(IsAStuff2(weaponid))
	{
	    PlayerGun[playerid][11] = weaponid;
	    PlayerAmmo[playerid][11] = 1;
	}
	GivePlayerWeapon(playerid,weaponid,ammo);
	return 1;
}
public ServerTakePlayerWeapon(playerid,weaponid)
{
	PyxiTime[playerid] = 5;
	for(new i = 0; i < 11; i++)
	{
		if(PlayerGun[playerid][i] == weaponid)
		{
		    PlayerGun[playerid][i] = 0;
		    PlayerAmmo[playerid][i] = 0;
		    break;
		}
	}
	ResetPlayerWeapons(playerid);
	for(new i = 0; i < 11; i++)
	{
	    GivePlayerWeapon(playerid,PlayerGun[playerid][i],PlayerAmmo[playerid][i]);
	}
	return 1;
}
public ServerGivePlayerMoney(playerid,money)
{
        DengiTime[playerid] = 15;
	    if(money > 0)
	    {
			PlayerInfo[playerid][pCash] += money;
	        GivePlayerMoney(playerid,money);
	    }
	    else
	    {
	        GivePlayerMoney(playerid,money);
	        PlayerInfo[playerid][pCash] += money;
	    }
		return 1;
}
public ServerGivePlayerArmour(playerid,Float:armour)
{
        ArmourTime[playerid] = 10;
        PlayerArmour[playerid] = armour;
       	SetPlayerArmour(playerid,armour);
		return 1;
}
public ServerGivePlayerHealth(playerid,Float:health)
{
        HealthTime[playerid] = 10;
        PlayerHealth[playerid] = health;
       	SetPlayerHealth(playerid,health);
		return 1;
}
public StdAnim(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pFightStyle] == 15)
		{
		    ClearAnimations(playerid);
		    ApplyAnimation(playerid,"FIGHT_E","FightKick_B",4.1,0,1,1,1,1);
		}
	}
	return 1;
}
public BoxAnim(playerid,num)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pFightStyle] == 5)
		{
		    ClearAnimations(playerid);
		    if(num == 2)
		    ApplyAnimation(playerid,"FIGHT_B","FightB_2",4.1,0,1,1,1,1);
		    else if(num == 3)
		    ApplyAnimation(playerid,"FIGHT_B","FightB_3",4.1,0,1,1,1,1);
		}
	}
	return 1;
}
public KarAnim(playerid,num)
{
    if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pFightStyle] == 6)
		{
		    ClearAnimations(playerid);
		    if(num == 2)
		    ApplyAnimation(playerid,"FIGHT_C","FightC_2",4.1,0,1,1,1,1);
		    else if(num == 3)
		    ApplyAnimation(playerid,"FIGHT_C","FightC_3",4.1,0,1,1,1,1);
		}
	}
	return 1;
}
public ThaAnim(playerid,num)
{
    if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pFightStyle] == 7)
		{
		    ClearAnimations(playerid);
		    if(num == 2)
		    ApplyAnimation(playerid,"FIGHT_D","FightD_2",4.1,0,1,1,1,1);
		    else if(num == 3)
		    ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.1,0,1,1,1,1);
		}
	}
	return 1;
}
public IsAtDealership(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(IsPlayerInRangeOfPoint(playerid,40,549.206115,-1276.320312,16.874300)||IsPlayerInRangeOfPoint(playerid,40,2526.225585,-1526.953613,23.623899)||IsPlayerInRangeOfPoint(playerid,40,599.643371,-1507.325073,14.866394))
	    {
	        return 1;
	    }
	    else if(IsPlayerInRangeOfPoint(playerid,40,2126.457519,-1152.129272,23.869300)||IsPlayerInRangeOfPoint(playerid,40,1054.454345,-909.379272,42.562801)||IsPlayerInRangeOfPoint(playerid,40,1623.161132,-1896.359497,13.122594))
	    {
			return 1;
	    }
	}
	return 0;
}
stock IsPlayerAiming(playerid, aimid)
{
	new Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2;
	GetPlayerPos(playerid, X1, Y1, Z1);
	GetPlayerPos(aimid, X2, Y2, Z2);
	new Float:Distance = floatsqroot(floatpower(floatabs(X1-X2), 2) + floatpower(floatabs(Y1-Y2), 2));
	if(Distance < 500)
	{
		new Float:A;
	 	GetPlayerFacingAngle(playerid, A);
	 	X1 += (Distance * floatsin(-A, degrees));
	 	Y1 += (Distance * floatcos(-A, degrees));
	 	Distance = floatsqroot(floatpower(floatabs(X1-X2), 2) + floatpower(floatabs(Y1-Y2), 2));
		if(Distance < 0.5)
		{
		    return true;
		}
	}
	return false;
}
stock FirstName(string[])//Возвращает имя игрока
{
	new end = strfind(string,"_",true);
	new result[MAX_PLAYER_NAME];
	strmid(result,string,0,end,MAX_PLAYER_NAME);
	return result;
}
stock LastName(string[])//Возвращает фамилию игрока
{
	new start = strfind(string,"_",true);
	new result[MAX_PLAYER_NAME];
	strmid(result,string,start+1,strlen(string),MAX_PLAYER_NAME);
	return result;
}
public IsPlayerNearPlayer(playerid,id,Float:range)
{
	new Float:x,Float:y,Float:z;
	GetPlayerPos(id,x,y,z);
	if(IsPlayerInRangeOfPoint(playerid,range,x,y,z))
	return 1;
	return 0;
}
public PlayerMovingObject(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerMoveObject[playerid] != 0)
		{
		    new keys,updown,leftright;
		    new Float:x,Float:y,Float:z;
			GetPlayerKeys(playerid,keys,updown,leftright);
			if(PlayerPutObject[playerid] == 1)//Двигает объект
			{
			    GetDynamicObjectPos(PlayerMoveObject[playerid],x,y,z);
			    if(updown > 0)//низ
			    SetDynamicObjectPos(PlayerMoveObject[playerid],x,y-0.15,z);
			    else if(updown < 0)//верх
			    SetDynamicObjectPos(PlayerMoveObject[playerid],x,y+0.15,z);
			    else if(leftright > 0)//право
			    SetDynamicObjectPos(PlayerMoveObject[playerid],x+0.15,y,z);
			    else if(leftright < 0)//лево
			    SetDynamicObjectPos(PlayerMoveObject[playerid],x-0.15,y,z);
			}
			else if(PlayerPutObject[playerid] == 2)//Поворачивает объект
			{
				GetDynamicObjectRot(PlayerMoveObject[playerid],x,y,z);
			    if(leftright > 0)//право
			    SetDynamicObjectRot(PlayerMoveObject[playerid],x,y,z+5);
			    else if(leftright < 0)//лево
			    SetDynamicObjectRot(PlayerMoveObject[playerid],x,y,z-5);
			}
			SetTimerEx("PlayerMovingObject",100,false,"i",playerid);
		}
	}
	return 1;
}
public Injured(playerid)
{
	ClearAnimations(playerid);
	TogglePlayerControllable(playerid, 1);
}
public FillUp(playerid)
{
   	if(IsPlayerConnected(playerid))
   	{
		new id = GetPlayerGasStation(playerid);
		if(id == -1)
	    {
	        if(PlayerLang[playerid] == 1)
	        SendClientMessage(playerid,COLOR_GREY,"Вы покинули заправку. Авто не заправлено");
	        else
	        SendClientMessage(playerid,COLOR_GREY,"You left Gas Station, your vehicle isn't filled");
	        return 1;
	    }
	    new string[128];
	    new carid = GetPlayerVehicleID(playerid);
		new price;
		if(IsTruck(carid)) price = ZapravkaBenz[id][0];
  		else if(IsStandartCar(carid)) price = ZapravkaBenz[id][1];
  		else if(IsEliteCar(carid)) price = ZapravkaBenz[id][2];
  		else if(IsSportCar(carid)) price = ZapravkaBenz[id][3];
  		else price = 2;
	    if(PlayerInfo[playerid][pCash] < price*PlayerBuyingGas[playerid])
	    {
	        if(PlayerLang[playerid] == 1)
	        SendClientMessage(playerid,COLOR_GREY,"У Вас недостаточно денег для этого");
	        else
	        SendClientMessage(playerid,COLOR_GREY,"You don't have enough cash");
	        return 1;
	    }
		if(CarInfo[carid][cGas] + PlayerBuyingGas[playerid] > GetVehicleMaxGas(carid))
		CarInfo[carid][cGas] = GetVehicleMaxGas(carid);
		else
		CarInfo[carid][cGas] +=PlayerBuyingGas[playerid];
		if(PlayerLang[playerid] == 1)
		format(string,sizeof(string),"В Ваш транспорт залито %d литров за $%d",PlayerBuyingGas[playerid],PlayerBuyingGas[playerid]*price);
		else
		format(string,sizeof(string),"Your vehicle filled with %d liters for $%d",PlayerBuyingGas[playerid],PlayerBuyingGas[playerid]*price);
		ServerGivePlayerMoney(playerid,-PlayerBuyingGas[playerid]*price);
		ZapravkaInfo[id][Bank] += PlayerBuyingGas[playerid]*price;
		SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
		PlayerBuyingGas[playerid] = 0;

	}
	return 1;
}
public LookOutside(playerid)
{
	if(IsPlayerConnected(playerid))
	{
    	if(PlayerLookFromTheHouse[playerid] != -1)
    	{
    	    SetPlayerPos(playerid,HouseInfo[PlayerLookFromTheHouse[playerid]][hOutPos_x],HouseInfo[PlayerLookFromTheHouse[playerid]][hOutPos_y],HouseInfo[PlayerLookFromTheHouse[playerid]][hOutPos_z]-3);
			PlayerLookFromTheHouseTimer[playerid] =  SetTimerEx("LookOutside",100,false,"i",playerid);
		}
	}
	return 1;
}
public Teleport(playerid)
{
	new T[12][32];
	new vw = GetPlayerVirtualWorld(playerid);
	for(new i = 0; i < TELEPORTS; i++)
	{
	    split(IntTel[i], T, ',');
	    if(IsPlayerInRangeOfPoint(playerid,4.0,floatstr(T[0]),floatstr(T[1]),floatstr(T[2])) && vw == strval(T[5]) && GetPlayerInterior(playerid) == strval(T[4]))
	    {
			
	        SetPlayerPos(playerid,floatstr(T[6]),floatstr(T[7]),floatstr(T[8]));
	        SetPlayerFacingAngle(playerid,floatstr(T[9]));
	        SetPlayerInterior(playerid,strval(T[10]));
	        SetPlayerVirtualWorld(playerid,strval(T[11]));
	        return 1;
	    }
	    else if(IsPlayerInRangeOfPoint(playerid,4.0,floatstr(T[6]),floatstr(T[7]),floatstr(T[8])) && vw == strval(T[11]) && GetPlayerInterior(playerid) == strval(T[10]))
	    {
	        SetPlayerPos(playerid,floatstr(T[0]),floatstr(T[1]),floatstr(T[2]));
	        SetPlayerFacingAngle(playerid,floatstr(T[3]));
	        SetPlayerInterior(playerid,strval(T[4]));
	        SetPlayerVirtualWorld(playerid,strval(T[5]));
	        return 1;
	    }
	}
	for(new i = 0; i < HousesToLoad; i++)
    {
		if(IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hOutPos_x],HouseInfo[i][hOutPos_y],HouseInfo[i][hOutPos_z]))
	    {
	    	if(HouseInfo[i][hLocked] == 1)
	        {
	        	if(PlayerLang[playerid] == 1)
	            SendClientMessage(playerid,COLOR_GREY,"Дверь этого дома закрыта");
	            else
	            SendClientMessage(playerid,COLOR_GREY,"This door is locked");
	            return 1;
			}
	        SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtWorld]);
	        SetPlayerHouseInterior(playerid,HouseInfo[i][hHouseInterior]);
	        return 1;
		}
	    else if(GetPlayerHouseInterior(playerid) == HouseInfo[i][hHouseInterior] && vw == HouseInfo[i][hVirtWorld])
	    {
	    	SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,HouseInfo[i][hOutPos_x],HouseInfo[i][hOutPos_y],HouseInfo[i][hOutPos_z]);
	        SetPlayerFacingAngle(playerid,HouseInfo[i][hOutAngle]);
	        return 1;
		}
	}
    for(new i = 0; i < HotelsToLoad; i++)
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,HotelInfo[i][hoOutPos_x],HotelInfo[i][hoOutPos_y],HotelInfo[i][hoOutPos_z]) && GetPlayerInterior(playerid) == HotelInfo[i][hoOutInterior] && GetPlayerVirtualWorld(playerid) == HotelInfo[i][hoOutVirtWorld])
	    {
		    if(HotelInfo[i][hoLocked] == 1)
	        {
	    	    if(PlayerLang[playerid] == 1)
	            SendClientMessage(playerid,COLOR_GREY,"Дверь этого номера закрыта");
	            else
	            SendClientMessage(playerid,COLOR_GREY,"This door is locked");
	        	return 1;
	        }
	        SetPlayerVirtualWorld(playerid,HotelInfo[i][hoVirtWorld]+10000);
	        SetPlayerHouseInterior(playerid,HotelInfo[i][hoHouseInterior]);
	        return 1;
		}
		else if(GetPlayerHouseInterior(playerid) == HotelInfo[i][hoHouseInterior] && vw == HotelInfo[i][hoVirtWorld]+10000)
	    {
	   		SetPlayerInterior(playerid,HotelInfo[i][hoOutInterior]);
	        SetPlayerVirtualWorld(playerid,HotelInfo[i][hoVirtWorld]);
	        SetPlayerPos(playerid,HotelInfo[i][hoOutPos_x],HotelInfo[i][hoOutPos_y],HotelInfo[i][hoOutPos_z]);
	        SetPlayerFacingAngle(playerid,HotelInfo[i][hoOutAngle]);
	        return 1;
		}
	}
	new name[MAX_PLAYER_NAME],string[64];
	GetPlayerName(playerid,name,sizeof(name));
	for(new i = 0; i < biz_LoadAmount[0]; i++)
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,ObshepitInfo[i][Biz_x],ObshepitInfo[i][Biz_y],ObshepitInfo[i][Biz_z]))
	    {
		    if(ObshepitInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(ObshepitInfo[i][Podtip] == 0)//Бургер шот
			{
				SetPlayerInterior(playerid,10);
				SetPlayerPos(playerid,362.889099,-75.186302,1001.507812);
				SetPlayerFacingAngle(playerid,295.015991);
			}
			else if(ObshepitInfo[i][Podtip] == 1)//Клакин белл
			{
				SetPlayerInterior(playerid,9);
				SetPlayerPos(playerid,365.665496,-11.775094,1001.851623);
				SetPlayerFacingAngle(playerid,356.196197);
			}
			else if(ObshepitInfo[i][Podtip] == 2)//Пиццерия
			{
				SetPlayerInterior(playerid,5);
				SetPlayerPos(playerid,372.237701,-133.503799,1001.492187);
				SetPlayerFacingAngle(playerid,0.213300);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 10 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,362.889099,-75.186302,1001.507812)
		|| GetPlayerInterior(playerid) == 9 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,365.665496,-11.775094,1001.851623)
		|| GetPlayerInterior(playerid) == 5 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,372.237701,-133.503799,1001.492187))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,ObshepitInfo[i][Biz_x],ObshepitInfo[i][Biz_y],ObshepitInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[1]; i++)
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,RestoranInfo[i][Biz_x],RestoranInfo[i][Biz_y],RestoranInfo[i][Biz_z]))
	    {
		    if(RestoranInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			SetPlayerInterior(playerid,4);
			SetPlayerPos(playerid,459.5327,-88.1492,999.5547);
			SetPlayerFacingAngle(playerid,90.2509);
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 4 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,459.5327,-88.1492,999.5547))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,RestoranInfo[i][Biz_x],RestoranInfo[i][Biz_y],RestoranInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[2]; i++)//Офисы
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,OfisInfo[i][Biz_x],OfisInfo[i][Biz_y],OfisInfo[i][Biz_z]))
	    {
		    if(OfisInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(OfisInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,1);
				SetPlayerPos(playerid,-2158.9998,642.7540,1052.3750);
				SetPlayerFacingAngle(playerid,178.1691);
			}
			else if(OfisInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,1494.4789,1304.2235,1093.2891);
				SetPlayerFacingAngle(playerid,355.6233);
			}
			else if(OfisInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,-2026.7998,-104.0349,1035.1719);
				SetPlayerFacingAngle(playerid,170.5118);
			}
			else if(OfisInfo[i][Podtip] == 3)
			{
				SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,1168.6372,1361.9683,10.9293);
				SetPlayerFacingAngle(playerid,180.8753);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 1 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-2158.9998,642.7540,1052.3750)
		|| GetPlayerInterior(playerid) == 3 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,1494.4789,1304.2235,1093.2891)
		|| GetPlayerInterior(playerid) == 3 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-2026.7998,-104.0349,1035.1719)
		|| GetPlayerInterior(playerid) == 0 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,1168.6372,1361.9683,10.9293))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,OfisInfo[i][Biz_x],OfisInfo[i][Biz_y],OfisInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[4]; i++)//Спортзалы
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,SportzalInfo[i][Biz_x],SportzalInfo[i][Biz_y],SportzalInfo[i][Biz_z]))
	    {
		    if(SportzalInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(SportzalInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,5);
				SetPlayerPos(playerid,772.2121,-4.2080,1000.7289);
				SetPlayerFacingAngle(playerid,359.7709);
			}
			else if(SportzalInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,6);
				SetPlayerPos(playerid,774.3896,-49.7593,1000.5859);
				SetPlayerFacingAngle(playerid,14.4235);
			}
			else if(SportzalInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,7);
				SetPlayerPos(playerid,774.1445,-77.5429,1000.6609);
				SetPlayerFacingAngle(playerid,3.7274);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 5 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,772.2121,-4.2080,1000.7289)
		|| GetPlayerInterior(playerid) == 6 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,774.3896,-49.7593,1000.5859)
		|| GetPlayerInterior(playerid) == 7 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,774.1445,-77.5429,1000.6609))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,SportzalInfo[i][Biz_x],SportzalInfo[i][Biz_y],SportzalInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[6]; i++)
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,KlubInfo[i][Biz_x],KlubInfo[i][Biz_y],KlubInfo[i][Biz_z]))
	    {
		    if(KlubInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			SetPlayerInterior(playerid,17);
			SetPlayerPos(playerid,493.7353,-24.2070,1000.6797);
			SetPlayerFacingAngle(playerid,359.9041);
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 14 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,493.7353,-24.2070,1000.6797))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,KlubInfo[i][Biz_x],KlubInfo[i][Biz_y],KlubInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[7]; i++)//Магазины
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,MagazinInfo[i][Biz_x],MagazinInfo[i][Biz_y],MagazinInfo[i][Biz_z]))
	    {
		    if(MagazinInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(MagazinInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,17);
				SetPlayerPos(playerid,-25.9836,-187.2684,1003.5469);
				SetPlayerFacingAngle(playerid,357.8207);
			}
			else if(MagazinInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,18);
				SetPlayerPos(playerid,-31.0023,-91.5486,1003.5469);
				SetPlayerFacingAngle(playerid,356.4572);
			}
			else if(MagazinInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,16);
				SetPlayerPos(playerid,-25.6798,-141.0319,1003.5469);
				SetPlayerFacingAngle(playerid,357.2758);
			}
			else if(MagazinInfo[i][Podtip] == 3)
			{
				SetPlayerInterior(playerid,10);
				SetPlayerPos(playerid,5.8059,-30.2043,1003.5494);
				SetPlayerFacingAngle(playerid,358.7140);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 17 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-25.9836,-187.2684,1003.5469)
		|| GetPlayerInterior(playerid) == 18 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-31.0023,-91.5486,1003.5469)
		|| GetPlayerInterior(playerid) == 16 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-25.6798,-141.0319,1003.5469)
		|| GetPlayerInterior(playerid) == 10 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,5.8059,-30.2043,1003.5494))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,MagazinInfo[i][Biz_x],MagazinInfo[i][Biz_y],MagazinInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[9]; i++)//Аммунации
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,AmmunaciaInfo[i][Biz_x],AmmunaciaInfo[i][Biz_y],AmmunaciaInfo[i][Biz_z]))
	    {
		    if(AmmunaciaInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(AmmunaciaInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,7);
				SetPlayerPos(playerid,315.6979,-142.7854,999.6016);
				SetPlayerFacingAngle(playerid,23.4676);
			}
			else if(AmmunaciaInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,1);
				SetPlayerPos(playerid,285.5787,-40.9008,1001.5156);
				SetPlayerFacingAngle(playerid,347.8133);
			}
			else if(AmmunaciaInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,6);
				SetPlayerPos(playerid,297.0533,-111.3264,1001.5156);
				SetPlayerFacingAngle(playerid,5.0467);
			}
			else if(AmmunaciaInfo[i][Podtip] == 3)
			{
				SetPlayerInterior(playerid,6);
				SetPlayerPos(playerid,316.2814,-169.4293,999.6010);
				SetPlayerFacingAngle(playerid,355.0200);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 7 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,315.6979,-142.7854,999.6016)
		|| GetPlayerInterior(playerid) == 1 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,285.5787,-40.9008,1001.5156)
		|| GetPlayerInterior(playerid) == 6 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,297.0533,-111.3264,1001.5156)
		|| GetPlayerInterior(playerid) == 6 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,316.2814,-169.4293,999.6010))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,AmmunaciaInfo[i][Biz_x],AmmunaciaInfo[i][Biz_y],AmmunaciaInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i; i < biz_LoadAmount[10]; i++)//Бар
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,BarInfo[i][Biz_x],BarInfo[i][Biz_y],BarInfo[i][Biz_z]))
	    {
		    if(BarInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(BarInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,1211.8427,-26.3264,1000.9531);
				SetPlayerFacingAngle(playerid,185.8459);
			}
			else if(BarInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,18);
				SetPlayerPos(playerid,-228.8253,1401.3436,27.7656);
				SetPlayerFacingAngle(playerid,272.9259);
			}
			else if(BarInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,11);
				SetPlayerPos(playerid,501.6829,-68.3154,998.7578);
				SetPlayerFacingAngle(playerid,180.2486);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 3 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,1211.8427,-26.3264,1000.9531)
		|| GetPlayerInterior(playerid) == 18 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-228.8253,1401.3436,27.7656)
		|| GetPlayerInterior(playerid) == 11 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,501.6829,-68.3154,998.7578))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,BarInfo[i][Biz_x],BarInfo[i][Biz_y],BarInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i; i < biz_LoadAmount[11]; i++)//Магазин мебели
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,MebelSalonInfo[i][Biz_x],MebelSalonInfo[i][Biz_y],MebelSalonInfo[i][Biz_z]))
	    {
		    if(MebelSalonInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(MebelSalonInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,1211.8427,-26.3264,1000.9531);
				SetPlayerFacingAngle(playerid,185.8459);
			}
			else if(MebelSalonInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,18);
				SetPlayerPos(playerid,-228.8253,1401.3436,27.7656);
				SetPlayerFacingAngle(playerid,272.9259);
			}
			else if(MebelSalonInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,11);
				SetPlayerPos(playerid,501.6829,-68.3154,998.7578);
				SetPlayerFacingAngle(playerid,180.2486);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 3 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,1211.8427,-26.3264,1000.9531)
		|| GetPlayerInterior(playerid) == 18 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,-228.8253,1401.3436,27.7656)
		|| GetPlayerInterior(playerid) == 11 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,501.6829,-68.3154,998.7578))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,MebelSalonInfo[i][Biz_x],MebelSalonInfo[i][Biz_y],MebelSalonInfo[i][Biz_z]);
	        return 1;
		}
	}
	for(new i = 0; i < biz_LoadAmount[13]; i++)//Магазины одежды
    {
	    if(IsPlayerInRangeOfPoint(playerid,3,OdejdaInfo[i][Biz_x],OdejdaInfo[i][Biz_y],OdejdaInfo[i][Biz_z]))
	    {
		    if(OdejdaInfo[i][Otkrut] == 0)
	        {
	    	    format(string,sizeof(string),"* %s пытается войти в здание, но дверь закрыта",name);
				MeAction(playerid,string,20);
	        	return 1;
	        }
			if(OdejdaInfo[i][Podtip] == 0)
			{
				SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,207.2190,-139.3794,1003.5078);
				SetPlayerFacingAngle(playerid,3.4842);
			}
			else if(OdejdaInfo[i][Podtip] == 1)
			{
				SetPlayerInterior(playerid,5);
				SetPlayerPos(playerid,226.8123,-7.7543,1002.2109);
				SetPlayerFacingAngle(playerid,84.2314);
			}
			else if(OdejdaInfo[i][Podtip] == 2)
			{
				SetPlayerInterior(playerid,1);
				SetPlayerPos(playerid,203.5749,-49.9413,1001.8047);
				SetPlayerFacingAngle(playerid,359.0934);
			}
			else if(OdejdaInfo[i][Podtip] == 3)
			{
				SetPlayerInterior(playerid,14);
				SetPlayerPos(playerid,204.3544,-168.4051,1000.5234);
				SetPlayerFacingAngle(playerid,358.0241);
			}
			else if(OdejdaInfo[i][Podtip] == 4)
			{
				SetPlayerInterior(playerid,15);
				SetPlayerPos(playerid,207.6702,-110.7161,1005.1328);
				SetPlayerFacingAngle(playerid,356.5276);
			}
			else if(OdejdaInfo[i][Podtip] == 5)
			{
				SetPlayerInterior(playerid,18);
				SetPlayerPos(playerid,161.5571,-96.2533,1001.8047);
				SetPlayerFacingAngle(playerid,5.2307);
			}
			SetPlayerVirtualWorld(playerid,i);
	        return 1;
		}
		else if(GetPlayerInterior(playerid) == 3 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,207.2190,-139.3794,1003.5078)
		|| GetPlayerInterior(playerid) == 5 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,226.8123,-7.7543,1002.2109)
		|| GetPlayerInterior(playerid) == 1 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,203.5749,-49.9413,1001.8047)
		|| GetPlayerInterior(playerid) == 14 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,204.3544,-168.4051,1000.5234)
		|| GetPlayerInterior(playerid) == 15 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,207.6702,-110.7161,1005.1328)
		|| GetPlayerInterior(playerid) == 18 && GetPlayerVirtualWorld(playerid) == i && IsPlayerInRangeOfPoint(playerid,3.0,161.5571,-96.2533,1001.8047))
	    {
	   		SetPlayerInterior(playerid,0);
	        SetPlayerVirtualWorld(playerid,0);
	        SetPlayerPos(playerid,OdejdaInfo[i][Biz_x],OdejdaInfo[i][Biz_y],OdejdaInfo[i][Biz_z]);
	        return 1;
		}
	}
 	return 1;
}
public IsPlayerAtBank(playerid)
{
/*	if(IsPlayerInRangeOfPoint(playerid,10.0,0.0,0.0,0.0)) //Вместо нулей вставь координаты и раскомментируй
	return 1;*/
	return 1;//Замени 1 на 0
}
public AddShoulderWeapon(playerid,gunid)
{
	new sl = -1;
	for(new i = 0; i < 11; i++)
	{
		if(PlayerGun[playerid][i] == gunid)
		{
			sl = i;
			break;
		}
	}
	if(sl != -1)
	{
		PlayerShoulderAmmo[playerid] = PlayerAmmo[playerid][sl];
		PlayerShoulderGun[playerid] = PlayerGun[playerid][sl];
		ServerTakePlayerWeapon(playerid,gunid);
		new n[MAX_PLAYER_NAME], string[60];
		GetPlayerName(playerid,n,sizeof(n));
		format(string,sizeof(string),"* %s вешает оружие на плечо",n);
		MeAction(playerid,string,15);
		SetPlayerHoldingObject(playerid, GetWeaponObject(gunid), 1,0,-0.14,-0.01);
		PlayerShoulderGun[playerid] = gunid;
	}
	return 1;
}
public RemoveShoulderWeapon(playerid)
{
	ServerGivePlayerWeapons(playerid,PlayerShoulderGun[playerid],PlayerShoulderAmmo[playerid]);
	PlayerShoulderGun[playerid] = 0;
	PlayerShoulderAmmo[playerid] = 0;
	new n[MAX_PLAYER_NAME], string[60];
	GetPlayerName(playerid,n,sizeof(n));
	format(string,sizeof(string),"* %s снимает оружие с плеча",n);
	MeAction(playerid,string,15);
	if(IsPlayerHoldingObject(playerid))
	StopPlayerHoldingObject(playerid);
	return 1;
}
stock bool:IsPlayerLookInRangeOfAngle(playerid,Float:range,Float:angle)
{
	new Float:minn = angle-range;
	new Float:maxx = angle+range;
	new Float:a;
	GetPlayerFacingAngle(playerid,a);
	if(a >= minn && a <= maxx) return true;
	return false;
}
stock bool:IsPlayerNearSprunk(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid,1.0,1929.7804,-1772.2373,13.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,2326.1287,-1646.1434,14.8270)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,1729.9548,-1944.0239,13.5681)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-15.0286,-139.4333,1003.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,2060.2893,-1898.6268,13.5538)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-32.6760,-185.7188,1003.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-16.1455,-90.8324,1003.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,495.8337,-23.5225,1000.6797)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,2224.4082,-1153.5974,1025.7969)) return true;
	return false;
}
stock bool:IsPlayerNearFood(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid,1.0,2140.5017,-1161.3413,23.9922)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,2153.9004,-1015.4160,62.8929)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,361.3969,159.5873,1008.3828)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-34.0516,-185.7855,1003.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-17.6013,-90.9684,1003.5469)) return true;
	if(IsPlayerInRangeOfPoint(playerid,1.0,-16.5363,-139.5496,1003.5469)) return true;
	return false;
}
stock AttempToGetAJob(playerid)
{
	new id, type;
	PlayerNearBiz(playerid,id,type);
	if(type == -1 || id == -1)
	{
		if(PlayerLang[playerid] == 1)
		SendClientMessage(playerid,COLOR_GREY,"Тебе нужно быть возле бизнеса");
		else
		SendClientMessage(playerid,COLOR_GREY,"There is no business near you");
		return 0;
	}
	if(GetPVarInt(playerid,"PlayerBiznesTip") != 0)
	{
		if(PlayerLang[playerid] == 1)
		SendClientMessage(playerid,COLOR_GREY,"Ты уже работаешь где-то");
		else
		SendClientMessage(playerid,COLOR_GREY,"You are already working somewhere");
		return 0;
	}
	if(PlayerInfo[playerid][pPnumber] == 0)
	{
	    if(PlayerLang[playerid] == 1)
		SendClientMessage(playerid,COLOR_GREY,"У тебя должен быть телефон!");
		else
		SendClientMessage(playerid,COLOR_GREY,"You must have a phone!");
		return 0;
	}
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	new slot = GetFreeJobPlace(type,id,name);
	if(slot == -1)
	{
	    if(PlayerLang[playerid] == 1)
		SendClientMessage(playerid,COLOR_GREY,"Ты не можешь оставить заявку здесь в данный момент!");
		else
		SendClientMessage(playerid,COLOR_GREY,"You can't leave your information here at this moment!");
		return 0;
	}
	if(slot == -2)
	{
	    if(PlayerLang[playerid] == 1)
		SendClientMessage(playerid,COLOR_GREY,"Ты уже оставил свою заявку в этом месте!");
		else
		SendClientMessage(playerid,COLOR_GREY,"You already left your information at this place!");
		return 0;
	}
	return 1;
}
stock GetPlayerID(name[])
{
	new name2[MAX_PLAYER_NAME];
	for(new playerid; playerid < GetMaxPlayers(); playerid++)
	{
		GetPlayerName(playerid,name2,sizeof(name2));
		if(!strcmp(name,name2,true))
		return playerid;
	}
	return -1;
}
stock IsAtFastFood(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid,1,370.8856,-6.0175,1001.8589) || IsPlayerInRangeOfPoint(playerid,1,368.1261,-6.0192,1001.8516)) return 1;//Клакин белл
	else if(IsPlayerInRangeOfPoint(playerid,1,376.4947,-67.4346,1001.5078) || IsPlayerInRangeOfPoint(playerid,1,373.6932,-65.5163,1001.5078)) return 1;//Бургер шот
	else if(IsPlayerInRangeOfPoint(playerid,1,372.7576,-118.8025,1001.4922) || IsPlayerInRangeOfPoint(playerid,1,376.6798,-118.8037,1001.4995)) return 1;//Пиццерия
	return 0;
}
stock GetPlayerGasStation(playerid)
{
	for(new id; id < biz_LoadAmount[8]; id++)
	{
		if(IsPlayerInRangeOfPoint(playerid,10.0,ZapravkaInfo[id][Biz_x],ZapravkaInfo[id][Biz_y],ZapravkaInfo[id][Biz_z]))
		return id;
	}
	return -1;
}
stock GetPlayerMagazin(playerid)
{
	new vw = GetPlayerVirtualWorld(playerid);
	for(new id; id < biz_LoadAmount[7]; id ++)
	{
		switch(MagazinInfo[id][Podtip])
		{
			case 0:	if(IsPlayerInRangeOfPoint(playerid,100,-31.0023,-91.5486,1003.5469) && vw == id) return id;
			case 1:	if(IsPlayerInRangeOfPoint(playerid,100,-25.6798,-141.0319,1003.5469) && vw == id) return id;
			case 2:	if(IsPlayerInRangeOfPoint(playerid,100,5.8059,-30.2043,1003.5494) && vw == id) return id;
		}
	}
	return -1;
}
stock GetPlayerAmmunation(playerid)
{
	new vw = GetPlayerVirtualWorld(playerid);
	for(new id; id < biz_LoadAmount[9]; id ++)
	{
		switch(AmmunaciaInfo[id][Podtip])
		{
			case 0:	if(IsPlayerInRangeOfPoint(playerid,5.0,308.5316,-141.3154,999.6016) && vw == id) return id;
			case 1:	if(IsPlayerInRangeOfPoint(playerid,5.0,295.8405,-38.3922,1001.5156) && vw == id) return id;
			case 2:	if(IsPlayerInRangeOfPoint(playerid,5.0,290.2627,-109.6486,1001.5156) && vw == id) return id;
			case 3:	if(IsPlayerInRangeOfPoint(playerid,5.0,312.1412,-166.1419,999.6010) && vw == id) return id;
		}
	}
	return -1;
}
stock GetPlayerMebelSalon(playerid)
{
	new vw = GetPlayerVirtualWorld(playerid);
	for(new id; id < biz_LoadAmount[11]; id ++)
	{
		switch(MebelSalonInfo[id][Podtip])
		{
			case 0:	if(IsPlayerInRangeOfPoint(playerid,5.0,1211.8427,-26.3264,1000.9531) && vw == id) return id;
			case 1:	if(IsPlayerInRangeOfPoint(playerid,5.0,-228.8253,1401.3436,27.7656) && vw == id) return id;
			case 2:	if(IsPlayerInRangeOfPoint(playerid,5.0,-228.8253,1401.3436,27.7656) && vw == id) return id;
		}
	}
	return -1;
}
stock SetPlayerMebelSalon(playerid,id)
{
	switch(MebelSalonInfo[id][Podtip])
	{
		case 0:
		{		
			SetPlayerPos(playerid,1211.8427,-26.3264,1000.9531); 
			SetPlayerInterior(playerid,3);
			return 1;
		}
		case 1:
		{		
			SetPlayerPos(playerid,-228.8253,1401.3436,27.7656); 
			SetPlayerInterior(playerid,18);
			return 1;
		}
		case 2:
		{		
			SetPlayerPos(playerid,501.6829,-68.3154,998.7578); 
			SetPlayerInterior(playerid,11);
			return 1;
		}
	}
	SetPlayerVirtualWorld(playerid,id);
	return 0;
}
stock GetPlayerClothShop(playerid)
{
	new vw = GetPlayerVirtualWorld(playerid);
	for(new id; id < biz_LoadAmount[13]; id ++)
	{
		if(vw != id) continue;
		switch(OdejdaInfo[id][Podtip])
		{
			case 0:	if(IsPlayerInRangeOfPoint(playerid,15.0,211.2166,-128.0530,1003.5152)) return id;//Про лапс
			case 1:	if(IsPlayerInRangeOfPoint(playerid,15.0,212.4593,-4.6369,1001.2109)) return id;//Жертва
			case 2:	if(IsPlayerInRangeOfPoint(playerid,15.0,209.1719,-47.1678,1001.8047)) return id;//Сабурбан
			case 3:	if(IsPlayerInRangeOfPoint(playerid,15.0,208.6255,-162.8179,1000.5234)) return id;//Дидье Саш
			case 4:	if(IsPlayerInRangeOfPoint(playerid,15.0,212.2132,-107.7897,1005.1328)) return id;//Бинко
			case 5:	if(IsPlayerInRangeOfPoint(playerid,15.0,148.4431,-87.6637,1001.8047)) return id;//Зип
		}
	}
	return -1;
}
