Make an airplane flying for tutorial?
#1

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? ..
Reply
#2

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

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.
Reply
#4

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)