SA-MP Forums Archive
Flying cars - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Flying cars (/showthread.php?tid=254931)



Flying cars [SOLVED] - CrunkBankS - 13.05.2011

[ame]http://www.youtube.com/watch?v=vI62TuatpFg[/ame]

How to make this?


Re: Flying cars - jonnyboy - 13.05.2011

its maybe cheat or a special long damn code.
it would be fun to have that on a server :P


Re: Flying cars - *IsBack - 13.05.2011

I think this is cheat, cause it is not possible (I think so) to script so smoothly flying car...


Re: Flying cars - CrunkBankS - 13.05.2011

This is possible


Re: Flying cars - CrunkBankS - 13.05.2011

I search that
https://sampforum.blast.hk/showthread.php?tid=199628

solved


Re: Flying cars - Sasino97 - 13.05.2011

Yes, it is possible:

pawn Код:
public OnPlayerKeyStateChange(playerid, oldkeys, newkeys)
{
  if(newkeys & KEY_FIRE)
  {
    if(IsPlayerInAnyVehicle(playerid))
    {
      new vehicleid = GetPlayerVehicleID(playerid);
      new Float:X,Float:Y,Float:Z;
      GetVehiclePos(vehicleid, X, Y, Z);
      SetVehiclePos(vehicleid, X, Y, Z +10);
    }
    return 1;
  }
  if(newkeys & KEY_HANDBRAKE)
  {
    if(IsPlayerInAnyVehicle(playerid))
    {
      new vehicleid = GetPlayerVehicleID(playerid);
      AddVehicleSpeed(vehicleid, 10.0)
    }
    return 1;
  }
  return 1;
}
stock AddVehicleSpeed(vid, Float:howmuch)
{
    static Float:T[3];
    GetVehicleVelocity(vid, T[0], T[1], T[2]);
    return SetVehicleVelocity(vid,T[0] * howmuch , T[1] * howmuch , T[2]);
}
UNTESTED CODE!!