Tutorial Help - RP Server +rep
#1

Hey guys!

I need some help with the current tutorial in my script. I tried to edit the co-ordinates as the gamemode map has moved from Los Santos to Red County, but it did not work at all and just bugged it out I guess!

If someone could help me with correcting the co-ordinates so they display on the game players screen I'd appreciate it a lot! Feel free to PM, message me on skype or on our forums!

Also looking for a scripter to join our community! Feel free to enquire, happy to have any form of assistance :]

The current lines are as followed:

Код:
forward PlayerCheck();
public PlayerCheck()
{
	static
		str[128],
		Float:health,
		id = -1;

	TotalledCheck();
	RestartCheck();

	foreach (new i : Player)
	{
	    if (!PlayerData[i][pLogged] && !PlayerData[i][pCharacter])
	        continue;

		if (PlayerData[i][pTutorial] > 0)
		{
		    PlayerData[i][pTutorialTime]--;

		    if (PlayerData[i][pTutorialTime] < 1)
		    {
		        switch (PlayerData[i][pTutorial])
		        {
		            case 1:
		            {
		                PlayerData[i][pTutorial] = 2;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Driving School");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "This is the ~g~~h~Driving School~w~. You can take your~n~driving test here. To pass the test, you must~n~avoid the obstacles.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "A driving license is required to legally drive in~n~this state. Driving recklessly or without a~n~license will alert the police!");

						#if SERVER_CITY == 1
                            SetPlayerPos(i, 1967.677978, -1991.190795, -3.260505);
							InterpolateCameraPos(i, 1642.303344, -2327.007568, 15.672925, 1967.677978, -1991.190795, 16.739494, 2000);
							InterpolateCameraLookAt(i, 1642.292968, -2327.523193, 15.546875, 1968.177246, -1991.205078, 16.651542, 2000);
                        #elseif SERVER_CITY == 2
			                SetPlayerPos(i, -2026.765991, -84.237663, 21.766628);
							InterpolateCameraPos(i, -2399.519287, 321.964355, 37.035743, -2026.765991, -84.237663, 41.766628, 2000);
							InterpolateCameraLookAt(i, -2399.951416, 322.215942, 37.015625, -2026.787597, -84.917533, 41.520622, 2000);
						#elseif SERVER_CITY == 3
			                SetPlayerPos(i, 1168.088500, 1381.582641, -3.185750);
							InterpolateCameraPos(i, 1711.642089, 1448.227294, 13.340233, 1168.088500, 1381.582641, 16.814249, 2000);
							InterpolateCameraLookAt(i, 1711.144897, 1448.224365, 13.289665, 1168.084472, 1381.082641, 16.674325, 2000);
						#endif
			        }
                    case 2:
		            {
		                PlayerData[i][pTutorial] = 3;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Dealership");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "This is the ~g~~h~Dealership~w~. You can purchase any~n~private owned vehicle for yourself, for a~n~certain price.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "Please remember to ~b~~h~/park~w~ your vehicle! Your~n~vehicle will be impounded if it's not parked~n~correctly.");

						#if SERVER_CITY == 1
						    SetPlayerPos(i, 546.784729, -1256.438354, 15.406070);
							InterpolateCameraPos(i, 1967.677978, -1991.190795, 16.739494, 546.784729, -1256.438354, 35.406070, 2000);
							InterpolateCameraLookAt(i, 1968.177246, -1991.205078, 16.651542, 546.749816, -1256.937133, 35.216030, 2000);
						#elseif SERVER_CITY == 2
			                SetPlayerPos(i, -2006.275146, 287.903869, 28.095851);
							InterpolateCameraPos(i, -2026.765991, -84.237663, 41.766628, -2006.275146, 287.903869, 48.095851, 2000);
							InterpolateCameraLookAt(i, -2026.787597, -84.917533, 41.520622, -2005.739257, 287.892669, 47.936939, 2000);
						#elseif SERVER_CITY == 3
                   			SetPlayerPos(i, 1635.780761, 1828.321289, 5.649860);
							InterpolateCameraPos(i, 1168.088500, 1381.582641, 16.814249, 1635.780761, 1828.321289, 25.649860, 2000);
							InterpolateCameraLookAt(i, 1168.084472, 1381.082641, 16.674325, 1636.280517, 1828.325683, 25.5048842, 2000);
						#endif
				    }
		            case 3:
		            {
		                PlayerData[i][pTutorial] = 4;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Jobs");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "There are a wide variety of jobs around the~n~city to choose from, this one being the~n~~r~~h~Courier~w~ job.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "There are many more jobs that will bring in~n~the income. Use ~g~~h~/joblist~w~ to find your preferred~n~job!");

						#if SERVER_CITY == 1
						    SetPlayerPos(i, 2420.203857, -2089.423095, -1.058326);
							InterpolateCameraPos(i, 556.450866, -1260.044677, 20.433259, 2420.203857, -2089.423095, 18.941673, 2000);
							InterpolateCameraLookAt(i, 556.276916, -1260.619628, 20.427263, 2420.703613, -2089.426269, 18.879707, 2000);
						#elseif SERVER_CITY == 2
			                SetPlayerPos(i, -1683.220336, -7.236631, -4.830643);
							InterpolateCameraPos(i, -2006.275146, 287.903869, 48.095851, -1683.220336, -7.236631, 15.169356, 2000);
							InterpolateCameraLookAt(i, -2005.739257, 287.892669, 47.936939, -1682.866577, -6.893327, 15.087323, 2000);
						#elseif SERVER_CITY == 3
			                SetPlayerPos(i, 1012.894348, 2137.586425, -4.546604);
							InterpolateCameraPos(i, 1635.780761, 1828.321289, 25.649860, 1012.894348, 2137.586425, 15.453395, 2000);
							InterpolateCameraLookAt(i, 1636.280517, 1828.325683, 25.504884, 1013.393859, 2137.540283, 15.364944, 2000);
						#endif
			        }
		            case 4:
		            {
		                PlayerData[i][pTutorial] = 5;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Real Estate");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "There are many real estate opportunities in~n~San Andreas. To purchase a house, type ~g~~h~/buy~n~~w~near the house icon.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "You can also purchase furniture and store your~n~goods inside your house. Type ~g~~h~/help~w~ for a list~n~of house commands.");

						#if SERVER_CITY == 1
						    SetPlayerPos(i, 1149.126586, -744.422912, 84.984420);
							InterpolateCameraPos(i, 2420.203857, -2089.423095, 18.941673, 1149.126586, -744.422912, 104.984420, 2000);
							InterpolateCameraLookAt(i, 2420.703613, -2089.426269, 18.879707, 1148.626708, -744.411132, 104.823509, 2000);
						#elseif SERVER_CITY == 2
			                SetPlayerPos(i, -2507.954101, 1125.971801, 44.563232);
							InterpolateCameraPos(i, 1683.220336, -7.236631, 15.169356, -2507.954101, 1125.971801, 64.563232, 2000);
							InterpolateCameraLookAt(i, -1682.866577, -6.893327, 15.087323, -2507.928710, 1126.796386, 64.145462, 2000);
						#elseif SERVER_CITY == 3
			                SetPlayerPos(i, 1380.143676, 2532.807373, -2.440540);
							InterpolateCameraPos(i, 1012.894348, 2137.586425, 15.453395, 1380.143676, 2532.807373, 17.559459, 2000);
							InterpolateCameraLookAt(i, 1013.393859, 2137.540283, 15.364944, 1380.643676, 2532.810302, 17.450519, 2000);
						#endif
			        }
		            case 5:
		            {
		                PlayerData[i][pTutorial] = 6;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Businesses");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "Businesses are also a way to bring in income.~n~You can adjust your business assets, including~n~the prices and a custom message.");//and even~n~hire employees to work for you!");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "This business is a ~p~~h~Retail Store~w~. You can buy~n~items using the ~g~~h~/buy~w~ command. Type ~g~~h~/help~n~~w~for more commands.");

						#if SERVER_CITY == 1
                            SetPlayerPos(i, 1315.212036, -916.465942, 24.322559);
							InterpolateCameraPos(i, 1149.126586, -744.422912, 104.984420, 1315.212036, -916.465942, 44.322559, 2000);
							InterpolateCameraLookAt(i, 1148.626708, -744.411132, 104.82350, 1315.211059, -915.965942, 44.212619, 2000);
						#elseif SERVER_CITY == 2
			                SetPlayerPos(i, -2442.177734, 726.758605, 21.054706);
							InterpolateCameraPos(i, -2507.954101, 1125.971801, 64.563232, -2442.177734, 726.758605, 41.054706, 2000);
							InterpolateCameraLookAt(i, -2507.928710, 1126.796386, 64.145462, -2442.179931, 727.221496, 40.933773, 2000);
						#elseif SERVER_CITY == 3
                   			SetPlayerPos(i, 2160.811035, 1992.461425, -1.797470);
							InterpolateCameraPos(i, 1380.143676, 2532.807373, 17.559459, 2160.811035, 1992.461425, 18.202529, 2000);
							InterpolateCameraLookAt(i, 1380.643676, 2532.810302, 17.450519, 2161.310546, 1992.449707, 18.108432, 2000);
						#endif
			        }
			        case 6:
		            {
		                PlayerData[i][pTutorial] = 7;
		                PlayerData[i][pTutorialTime] = 10;

		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Hunger and Thirst");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "Your hunger and thirst meter is shown on~n~the right side of the screen. After a while~n~your character will get hungry.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "This is a ~y~Fast Food~w~ business. You can purchase~n~food here. Also, you can purchase food and~n~drinks at a ~y~Retail Store.");

						SetPlayerInterior(i, 10);
						SetPlayerPos(i, 365.013977, -73.615165, 983.073730);
						SetPlayerCameraPos(i, 365.013977, -73.615165, 1003.073730);
						SetPlayerCameraLookAt(i, 365.426818, -73.318977, 1003.007812);
			        }
		            case 7:
		            {
		                PlayerData[i][pTutorial] = 8;
		                PlayerData[i][pTutorialTime] = 10;

						SetPlayerInterior(i, 0);
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][59], "Tutorial: Conclusion");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][60], "This tutorial is now finished. Remember, if you~n~need any assistance, use the ~g~~h~/seekhelp~n~~w~command and wait patiently.");
		                PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][61], "Prosperity Gaming wishes to thank you for~n~playing at our server! You will spawn in a~n~moment.");

						#if SERVER_CITY == 1
                            SetPlayerPos(i, 1226.481567, -1144.220336, 31.174240);
							InterpolateCameraPos(i, 1202.077392, -929.400634, 47.784023, 1226.481567, -1144.220336, 51.174240, 2000);
							InterpolateCameraLookAt(i, 1202.008300, -928.905456, 47.673583, 1225.981567, -1144.216186, 51.160247, 2000);
						#elseif SERVER_CITY == 2
			                SetPlayerPos(i, -2016.094970, -306.215942, 55.449806);
							InterpolateCameraPos(i, -2336.783935, -187.118865, 44.045051, -2016.094970, -306.215942, 75.449806, 2000);
							InterpolateCameraLookAt(i, -2336.785400, -186.618865, 43.885139, -2016.088867, -305.735107, 75.390838, 2000);
						#elseif SERVER_CITY == 3
			                SetPlayerPos(i, 2115.572753, 2113.175292, 6.203048);
							InterpolateCameraPos(i, 1871.407104, 2052.714599, 20.308364, 2115.572753, 2113.175292, 26.203048, 2000);
							InterpolateCameraLookAt(i, 1871.404663, 2053.214599, 20.169441, 2115.072753, 2113.184326, 26.153575, 2000);
						#endif
			        }
		            case 8:
		            {
		                for (new j = 58; j < 62; j ++) {
		                    PlayerTextDrawHide(i, PlayerData[i][pTextdraws][j]);
						}
						SetDefaultSpawn(i);
		                ShowHungerTextdraw(i, 1);

		                PlayerData[i][pCreated] = 1;
		                PlayerData[i][pTask] = 1;

		                PlayerData[i][pTutorial] = 0;
		                PlayerData[i][pTutorialTime] = 0;

		                SendServerMessage(i, "Type /tasks to view your current tasks to complete.");
		            }
		        }
		    }
		}
Reply
#2

It's pretty simple you need to use something like map editor to get the coordinates/cameralookat for the locations and update the following:
pawn Код:
#if SERVER_CITY == 1
SetPlayerPos(i, 1967.677978, -1991.190795, -3.260505);
InterpolateCameraPos(i, 1642.303344, -2327.007568, 15.672925, 1967.677978, -1991.190795, 16.739494, 2000);
InterpolateCameraLookAt(i, 1642.292968, -2327.523193, 15.546875, 1968.177246, -1991.205078, 16.651542, 2000);
Feel free to message me if you need any help.
Reply
#3

Still having trouble trying to sort it out mate!

I've sent you a PM, is anyone able to assist in the mean time?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)