SA-MP Forums Archive
Make an airplane flying for tutorial? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Make an airplane flying for tutorial? (/showthread.php?tid=546622)



Make an airplane flying for tutorial? - Metharon - 16.11.2014

Hello , i tried to create an airplane which one fly forward , but the problem is that he's falling.




Code:
	if(strcmp(cmd, "/test", true) == 0)
	{
	    TogglePlayerSpectating(playerid, 1);
	    InterpolateCameraPos(playerid,2351.6499, -1926.1400, 111.2500, 2430.1599, -1876.8300, 111.2500, 120000);
	 	InterpolateCameraLookAt(playerid, 2352.6599, -1926.2000, 111.2400,2430.2200, -1877.8400, 111.4700,120000);
		AirplaneTutorialVeh[playerid] = CreateVehicle(592, 2443.4148, -1940.8149, 111.7929, 90.4175, -1, -1, 100);
        SetVehicleVelocity(AirplaneTutorialVeh[playerid], 3.0, 0.0, 0.2);
		SetTimerEx("AirplaneTutorial", 5000, 1, "d", playerid);
		return 1;
	}

Function AirplaneTutorial(playerid)
{
	SetVehicleVelocity(AirplaneTutorialVeh[playerid], 3.0, 0.0, 0.2);
	return 1;
}
How can i make the airplane to fly forward? ..


Re: Make an airplane flying for tutorial? - Capua - 16.11.2014

These two tutorials should help you;
https://sampforum.blast.hk/showthread.php?tid=170545
https://sampforum.blast.hk/showthread.php?tid=95034


Re: Make an airplane flying for tutorial? - Abagail - 16.11.2014

You should use a NPC to do this. How-ever, if two players are in the tutorial at the same time, and the same coordinates are used it won't be good. You can record the path you want using npc_record(filterscript inside default SA:MP package), and then connect an NPC when needed, create a vehicle, and teleport the NPC inside it.


Re: Make an airplane flying for tutorial? - Metharon - 16.11.2014

I don't want to use npcs , i can't make the airplane to fly forward for 10 sec?


Re: Make an airplane flying for tutorial? - Capua - 16.11.2014

Quote:
Originally Posted by Metharon
View Post
I don't want to use npcs , i can't make the airplane to fly forward for 10 sec?
There is an Andromada object available so you could try to use Object ID 1683 and MoveObject function, no need for bots.

https://sampwiki.blast.hk/wiki/MoveObject