SA-MP Forums Archive
Vehicle's rotation 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle's rotation velocity? (/showthread.php?tid=131985)



Vehicle's rotation velocity? - Miguel - 06.03.2010

The title say it all, how would I get it?


Re: Vehicle's rotation velocity? - [HiC]TheKiller - 06.03.2010

I don't think there is such function but you can check the last facing angle of the vehicle using a timer =].

pawn Код:
new VehicleRot[MAX_PLAYERS];

public OnGameModeInit()
{
  SetTimer("Timer", 500, true);
  return 1;
}
public Timer()
{
  for(new i; i<MAX_PLAYERS; i++)
  {
    if(IsPlayerInAnyVehicle(i))
    {
      new Float:Angle;
      GetPlayerFacingAngle(playerid, Angle);
      VehicleRot[playerid] = Angle;
    }
  }
  return 1;
}



Re: Vehicle's rotation velocity? - Miguel - 06.03.2010

Helped me a lot... thanks!