Police Speed Radar!
#8

Quote:
Originally Posted by VonLeeuwen
Code:
stock GetPlayerSpeed(playerid)
{
  new Float:X, Float:Y, Float:Z;
  if(IsPlayerInAnyVehicle(playerid))
  {
    GetVehicleVelocity(GetPlayerVehicleID(playerid), X, Y, Z);
    return floatround(floatmul(floatmul(floatsqroot(floatpower(floatabs(X), 2) + floatpower(floatabs(Y), 2) + floatpower(floatabs(Z), 2)), 100), 1.621371192), floatround_round);
  }
  else
  {
    GetPlayerVelocity(playerid, X, Y, Z);
    return floatround(floatmul(floatmul(floatsqroot(floatpower(floatabs(X), 2) + floatpower(floatabs(Y), 2) + floatpower(floatabs(Z), 2)), 100), 1.621371192), floatround_round);
  }
}
Woah, This really returns the players speed/vehicle speed in km/h?
Reply


Messages In This Thread
Police Speed Radar! - by [LSR]State_Trooper - 26.02.2010, 09:08
Re: Police Speed Radar! - by [LSR]State_Trooper - 26.02.2010, 09:23
Re: Police Speed Radar! - by [LSR]State_Trooper - 26.02.2010, 09:31
Re: Police Speed Radar! - by VonLeeuwen - 26.02.2010, 10:29
Re: Police Speed Radar! - by addinol - 26.02.2010, 10:30
Re: Police Speed Radar! - by [LSR]State_Trooper - 26.02.2010, 10:32
Re: Police Speed Radar! - by VonLeeuwen - 26.02.2010, 10:37
Re: Police Speed Radar! - by bajskorv123 - 26.02.2010, 13:14
Re: Police Speed Radar! - by VonLeeuwen - 26.02.2010, 14:02
Re: Police Speed Radar! - by bajskorv123 - 26.02.2010, 14:48

Forum Jump:


Users browsing this thread: 2 Guest(s)