Airplane velocity?
#1

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]);
Reply
#2

Show the code of how you actualy activate the velocity
Reply
#3

Код:
	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?
Reply
#4

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)