SA-MP Forums Archive
Airplane velocity? - 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: Airplane velocity? (/showthread.php?tid=546665)



Airplane velocity? - Metharon - 16.11.2014

How can i make the airplane go forward? i tried to give 25,0 velocity / 250 sec but is still not working the airplane is falling...



Please?
Код:
        new Float:Velocity[3];
        GetVehicleVelocity(fly[playerid], Velocity[0], Velocity[1], Velocity[2]);
  	  SetVehicleVelocity(fly[playerid], 25.0 , Velocity[1], Velocity[2]);



Re: Airplane velocity? - AIped - 16.11.2014

Show the code of how you actualy activate the velocity


Re: Airplane velocity? - Metharon - 16.11.2014

Код:
	if(strcmp(cmd, "/test", true) == 0)
	{
	    TogglePlayerSpectating(playerid, 1);
	    InterpolateCameraPos(playerid,1386.2100, -2173.7600, 128.9300,1544.9874, -2138.2395, 151.3702,20000);
	 	InterpolateCameraLookAt(playerid, 1387.0900, -2174.2500, 128.3500,1544.7811, -2139.2263, 150.7503,20000);
	 	fly[playerid] = CreateVehicle(577, 1476.9530, -2199.7683, 80.4072, 183.2097, -1, -1, 100);

		//fly[playerid] = CreatePlayerObject(playerid, 1683, 1500.15894, -2213.15894, 83.03691,   0.00000, 0.00000, 280.46643);
		//MovePlayerObject(playerid, fly[playerid], 1500.64063, -2320.23560, 83.03690, 6);
        new Float:Velocity[3];
        GetVehicleVelocity(fly[playerid], Velocity[0], Velocity[1], Velocity[2]);
  	  SetVehicleVelocity(fly[playerid], 25.0 , Velocity[1], Velocity[2]);
       	SetTimerEx("Zboara", 250, true, "d", playerid);
		return 1;
	}
.. how i make the airplane flying toward at a slow speed?


Re: Airplane velocity? - Mauzen - 16.11.2014

Use NPCs for that, you cant move unoccupied vehicles with SetVehicleVelocity.
Also, 25.0 is way too much, and would bug all players inside the plane. Velocity components should always be <1.0 for GTA-realisitic speeds.


Re : Airplane velocity? - Dutheil - 16.11.2014

Try this
pawn Код:
SetVehicleVelocity(fly[playerid], Velocity[1]/1.5 , Velocity[1]/1.5, Velocity[2]/1.5);



Re: Airplane velocity? - Abagail - 16.11.2014

Someone already told you what to do in your last post.
https://sampforum.blast.hk/showthread.php?tid=546622
Quote:
Originally Posted by Capua
Посмотреть сообщение
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
You can simply do it like this. See,
https://sampwiki.blast.hk/wiki/CreateObject