Flying cars
#1

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

How to make this?
Reply
#2

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

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

This is possible
Reply
#5

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

solved
Reply
#6

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!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)