Перейти к содержанию
Авторизация  
Zishka

Нет маркеров при сдачи на права.

Рекомендуемые сообщения

Zishka

Нет маркеров при сдачи на права.

new DrivingTestTime[MAX_PLAYERS];
====================================
static const stock Float:DrivingTest[][] = { //??????? ?????????
	{2518.3521,-943.0078,1.5473},
	{2530.6912,-951.1514,1.5648},
	{2530.6284,-980.3601,1.5648},
	{2539.3662,-987.0689,1.5648},
	{2546.7700,-978.8175,1.5648},
	{2538.1462,-970.8574,1.5648},
	{2546.5083,-965.0141,1.5648},
	{2543.1570,-953.0804,1.6003},
	{2543.5869,-933.9211,1.5643},
	{2519.6567,-932.3250,1.5521},
	{2440.2710,-969.5776,1.6911},
	{2402.0623,-957.2614,1.6986},
	{2401.9036,-809.1680,11.9104},
	{2617.1260,-801.5764,11.8587},
	{2829.0303,-804.8586,12.0126},
	{2881.9363,-877.1386,12.9502},
	{2771.3201,-906.3696,23.3435},
	{2754.9229,-788.1655,23.3494},
	{2775.2251,-676.7038,23.0283},
	{2879.6682,-702.0443,12.9838},
	{2797.8477,-784.8743,11.8354},
	{2364.7886,-787.0987,12.3175},
	{2054.1025,-832.2196,15.3488},
	{1725.9747,-875.8348,27.4830},
	{1583.7145,-706.0786,40.9403},
	{1393.3134,-601.9888,40.8304},
	{1399.5229,-401.5157,3.8574},
	{1405.7042,-242.8828,3.8403},
	{1420.1896,-223.1886,3.8581},
	{1770.6417,-223.3907,3.8522},
	{1792.6815,-250.1992,3.8206},
	{1831.4423,-306.7342,6.1373},
	{2118.2024,-499.9554,16.5656},
	{2138.9604,-803.2497,14.4131},
	{2184.6172,-816.4596,14.2913},
	{2386.7168,-801.8486,12.2070},
	{2396.0981,-853.6970,7.0027},
	{2396.5745,-958.5002,1.6927},
	{2384.9424,-970.9503,2.1115},
	{2303.9861,-970.2287,2.0958},
	{2290.3962,-983.5339,2.0686},
	{2292.4207,-1108.5098,2.4205},
	{2297.8481,-1098.3212,2.4545},
	{2298.9441,-1035.9512,2.4320},
	{2298.6299,-983.1883,2.0704},
	{2227.0259,-971.6880,2.1294},
	{2159.6226,-971.7393,2.1293},
	{2094.3320,-964.7982,2.0513},
	{2086.5649,-973.6376,2.0493},
	{2114.1008,-974.5452,2.1446},
	{2152.0205,-974.9900,2.1298},
	{2332.3323,-976.1116,2.1076},
	{2420.5447,-976.5681,2.2213},
	{2452.7170,-1005.1452,2.1600},
	{2468.4470,-1018.7527,2.0337},
	{0.0,0.0,0.0}
};
====================================
static const stock Float:FlyTest[][] = {
    {2513.2139,-1000.0962,117.0660},
    {2680.7329,-1085.0205,105.9101},
    {2908.2346,-1126.7103,21.2477},
    {2736.8682,-1200.3679,14.8405},
    {2528.1045,-1203.1923,40.4371},
    {2269.3281,-1132.1639,2.7305},
    {2400.2324,-1109.5310,31.7281},
    {2458.8047,-1000.4865,2.3861},
	{0.0,0.0,0.0}
};
============================================
static const stock Float:WaterTest[][] = {
	{2522.4609,-1092.4988,0.0825},
	{2702.9272,-1100.7075,0.2249},
	{2807.8630,-1104.4086,0.0990},
	{2935.7297,-1239.4073,0.1528},
	{3010.7986,-1217.1238,0.3958},
	{3071.2795,-1234.1112,0.7060},
	{3029.9722,-1241.5240,-0.2974},
	{2959.0789,-1216.1912,-0.2271},
	{2901.2136,-1246.0934,0.1416},
	{2818.0613,-1208.9335,0.0154},
	{2656.1953,-1208.0315,0.0814},
	{2567.8455,-1233.3177,-0.0046},
	{2358.7080,-1232.1560,-0.0214},
	{2106.8176,-1249.7622,0.1163},
	{1961.7560,-1209.2106,-0.0071},
	{2153.0806,-1143.3785,-0.0745},
	{2331.6938,-1149.5795,0.0940},
	{2460.1182,-1094.0985,0.1123},
	{0.0,0.0,0.0}
};
=======================================================
	if(GetPVarInt(playerid, "DrivingTest"))
	{
		SetVehicleToRespawn(GetPVarInt(playerid,"DrivingTestCARID"));
		DeletePVar(playerid, "DrivingTestCARID");
		DeletePVar(playerid, "DrivingTest");
		DeletePVar(playerid, "DrivingTestHealth");
		DeletePVar(playerid, "DrivingTestError");
		SCM(playerid, COLOR_RED, "Вы провалили экзамен на управление наземным транспортом");
	}
	if(GetPVarInt(playerid, "FlyTest"))
	{
	    SetVehicleToRespawn(GetPVarInt(playerid,"FlyTestCARID"));
		DeletePVar(playerid, "FlyTestCARID");
		DeletePVar(playerid, "FlyTest");
		DeletePVar(playerid, "FlyTestHealth");
		DeletePVar(playerid, "FlyTestError");
		SCM(playerid, COLOR_RED, "Вы провалили экзамен на управление воздушным транспортом");
	}
	if(GetPVarInt(playerid, "WaterTest"))
	{
	    SetVehicleToRespawn(GetPVarInt(playerid,"WaterTestCARID"));
		DeletePVar(playerid, "WaterTestCARID");
		DeletePVar(playerid, "WaterTest");
		DeletePVar(playerid, "WaterTestTimeOn");
		DeletePVar(playerid, "WaterTestHealth");
		DeletePVar(playerid, "WaterTestError");
		SCM(playerid, COLOR_RED, "Вы провалили экзамен на управление водным транспортом");
====================================================================================
	}
	switch(newstate)
	{
		case 1: //Игрок пешком (можно писать PLAYER_STATE_ONFOOT)
		{
			KillTimer(STimer[playerid]),KillTimer(update_speed[playerid]);
			for(new i; i < 9; i++) PlayerTextDrawHide(playerid,SpeedMetr[playerid][i]);
			for(new i; i < 7; i++) TextDrawHideForPlayer(playerid,SpeedBox[i]);
			if(GetPVarInt(playerid, "DrivingTest"))
			{
				SCM(playerid, COLOR_RED, "У вас есть 15 секунд, чтобы вернуться");
				DisablePlayerRaceCheckpoint(playerid);
				DrivingTestTime[playerid] = 15;
			}
			if(PI[playerid][TruckerCarID] != INVALID_VEHICLE_ID)
			{
				SCM(playerid, COLOR_RED, "У вас есть 15 секунд, чтобы вернуться");
				//DisablePlayerRaceCheckpoint(playerid);
				TruckWorkTime[playerid] = 15;
			}
			if(GetPVarInt(playerid, "FlyTest"))
			{
				SCM(playerid, COLOR_RED, "У вас есть 15 секунд, чтобы вернуться");
				DisablePlayerRaceCheckpoint(playerid);
				FlyTestTime[playerid] = 15;
			}
			if(GetPVarInt(playerid, "WaterTest") && GetPVarInt(playerid, "WaterTestTimeOn"))
			{
				SCM(playerid, COLOR_RED, "У вас есть 15 секунд, чтобы вернуться");
				DisablePlayerRaceCheckpoint(playerid);
				WaterTestTime[playerid] = 15;
			}
			if(GetPVarInt(playerid, "PriceBus"))
			{
				SCM(playerid, COLOR_RED, "У вас есть 15 секунд, чтобы вернуться");
				DisablePlayerRaceCheckpoint(playerid);
				SetPVarInt(playerid, "BusTime", 15);
				DeletePVar(playerid, "TimeBus");
			}
		}
===============================================================================
				for(new v = 0; v <= TOTALVEH; v++)
				{
					if(vehicleid == VehInfo[v][vVehicle])
					{
						if(GetPVarInt(playerid, "DrivingTest") > 0 && (vehicleid >= 117 && vehicleid <= 126))
						{
						    if(UseGPS[playerid])
							{
						    	DisablePlayerRaceCheckpoint(playerid);
						    	UseGPS[playerid] = false;
						    	for(new i; i < 4; i++) TextDrawHideForPlayer(playerid, GPSEnabled[i]);
							}
							SCM(playerid, COLOR_BLUE, "Следуйте по чекпоинтам, соблюдая правила дорожного движения");
       						ShowPlayerDialog(playerid, D_NULL, 0, " ", "\n\n{ffffff}Ваша задача следовать по чекпоинтам. Вперед\n\n", "Закрыть", "");
							new i = pPressed[playerid];
							SetPVarInt(playerid,"DrivingTestCARID",GetPlayerVehicleID(playerid));
							SetPlayerRaceCheckpoint(playerid,0,DrivingTest[i][0],DrivingTest[i][1],DrivingTest[i][2],DrivingTest[i+1][0],DrivingTest[i+1][1],DrivingTest[i+1][2],5.0);
						} else if(GetPVarInt(playerid, "DrivingTest") == 0 && (vehicleid >= 117 && vehicleid <= 126)) SCM(playerid,COLOR_RED,"Транспорт доступен только для сдачи экзаменов."),RemoveFromVehicle(playerid);
						
						if(GetPVarInt(playerid, "FlyTest") == 1 && (vehicleid >= 183 && vehicleid <= 184))
						{

						    if(UseGPS[playerid])
							{
						    	DisablePlayerRaceCheckpoint(playerid);
						    	UseGPS[playerid] = false;
						    	for(new i; i < 4; i++) TextDrawHideForPlayer(playerid, GPSEnabled[i]);
							}
						    SCM(playerid, COLOR_BLUE, "Следуйте по чекпоинтам, соблюдая правила полёта");
   						 	ShowPlayerDialog(playerid, D_NULL, 0, " ", "\n\n{ffffff}Ваша задача следовать по чекпоинтам. Взлетайте\n\n", "Закрыть", "");
							new i = pPressed[playerid];
							SetPVarInt(playerid,"FlyTestCARID",GetPlayerVehicleID(playerid));
							SetPlayerRaceCheckpoint(playerid,3,FlyTest[i][0],FlyTest[i][1],FlyTest[i][2],FlyTest[i+1][0],FlyTest[i+1][1],FlyTest[i+1][2],5.0);
						} else if(GetPVarInt(playerid, "FlyTest") == 0 && (vehicleid >= 183 && vehicleid <= 184)) SCM(playerid,COLOR_RED,"Транспорт доступен только для сдачи экзаменов."),RemoveFromVehicle(playerid);

                        if(GetPVarInt(playerid, "WaterTest") == 1 && (vehicleid >= 185 && vehicleid <= 186))
						{
						    if(UseGPS[playerid])
							{
						    	DisablePlayerRaceCheckpoint(playerid);
						    	UseGPS[playerid] = false;
						    	for(new i; i < 4; i++) TextDrawHideForPlayer(playerid, GPSEnabled[i]);
							}
						    SCM(playerid, COLOR_BLUE, "Следуйте по чекпоинтам, соблюдая правила движения");
   						 	ShowPlayerDialog(playerid, D_NULL, 0, " ", "\n\n{ffffff}Ваша задача следовать по чекпоинтам. Вперед\n\n", "Закрыть", "");
							new i = pPressed[playerid];
							if(!GetPVarInt(playerid, "WaterTestTimeOn")) SetPVarInt(playerid, "WaterTestTimeOn", 1);
							SetPVarInt(playerid,"WaterTestCARID",GetPlayerVehicleID(playerid));
							SetPlayerRaceCheckpoint(playerid,0,WaterTest[i][0],WaterTest[i][1],WaterTest[i][2],WaterTest[i+1][0],WaterTest[i+1][1],WaterTest[i+1][2],5.0);
						} else if(GetPVarInt(playerid, "WaterTest") == 0 && (vehicleid >= 185 && vehicleid <= 186)) SCM(playerid,COLOR_RED,"Транспорт доступен только для сдачи экзаменов."),RemoveFromVehicle(playerid);
						
						if(VehInfo[v][vFraction] != PI[playerid][pMember])
						{
							if(VehInfo[v][vFraction] == TEAM_AUTOSCHOOL && (GetPVarInt(playerid, "DrivingTest") > 0 || GetPVarInt(playerid, "FlyTest") > 0 || GetPVarInt(playerid, "WaterTest") > 0)) { }
							else
							{
								SCM(playerid, COLOR_GREY, "Этот транспорт вам недоступен!");
								RemoveFromVehicle(playerid);
								return 1;
							}
						} else break;
					}
				}
				if(cars == 0)
				{
					if(PI[playerid][pLic][0] == 0)
					{
						if(GetPVarInt(playerid, "DrivingTest") > 0) { }
						else
						{
                            if(!IsAMoped(vehicleid) && !IsAVel(vehicleid) && !IsAPlane(vehicleid) && !IsABoat(vehicleid))
							{
								SCM(playerid, COLOR_GREY, "У вас нет водительских прав!");
								RemoveFromVehicle(playerid);
								return 1;
							}
						}
					}
					if(Engine[vehicleid] == false)
					update_speed[playerid] = SetTimerEx("UpdateSpeedometr", 1000, true, "d", playerid);//KillTimer(update_speed);
					{
						if(IsAVel(vehicleid))
						{
							GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
							SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
						}
						else
						{
						    if(!InShop[playerid])
							{
								SCM(playerid, COLOR_BLUE, "Нажмите клавишу '{FF6600}2{0099FF}', чтобы завести двигатель, фары '{FF6600}W + ЛКМ{0099FF}'");
								if(IsAPlane(vehicleid) == 0 && IsABoat(vehicleid) == 0 && IsAVel(vehicleid) == 0)
        						{
									for(new c; c < 9; c++) PlayerTextDrawShow(playerid,SpeedMetr[playerid][c]);
		    	                    for(new c; c < 7; c++) TextDrawShowForPlayer(playerid,SpeedBox[c]);
                          		}
							}
						}
 					}
	if(GetPVarInt(playerid, "DrivingTest") > 0)
	{
		if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_GREY, "Вы должны находиться за рулем!");
		if(pPressed[playerid] == 54)
		{
			if(GetPVarInt(playerid, "DrivingTestError") > 2)
			{
				SCM(playerid, COLOR_RED, "Вы провалили экзамен на управление наземным транспортом");
				ShowPlayerDialog(playerid, D_NULL, 0, " ", "\n\n{F04245}К сожалению вы не сдали экзамен на управление наземным транспортом\n\n", "Закрыть", "");
			}
			else
			{
				SCM(playerid, COLOR_GREEN, "Поздравляем! Вы сдали экзамен на управление наземным транспортом");
				ShowPlayerDialog(playerid, D_NULL, 0, " ", "\n\n{ffffff}Поздравляем, вы сдали экзамен на управление наземным транспортом\n\n", "Закрыть", "");
				PI[playerid][pLic][0] = 1;
			}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Гость
Эта тема закрыта для публикации ответов.
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

Мы разместили cookie-файлы на ваше устройство, чтобы помочь сделать этот сайт лучше. Вы можете изменить свои настройки cookie-файлов, или продолжить без изменения настроек.