GetVehicleVelocity...
#1

Hello, I have decided to make an Speedometer for 0.3 and I got 1 problem...
Speedo only shows 1 KM\H when I enter a car.

Here is my code:
pawn Код:
public OnPlayerUpdate(playerid)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(IsPlayerInAnyVehicle(i))
      {
        new Float:Velocity[3], output[20];
        format(output, sizeof(output), "~r~%i ~w~KM/H", GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]));
        TextDrawSetString(Text:KMH[i], output);
        TextDrawShowForPlayer(i, Text:KMH[i]);
      }
      else
      {
        TextDrawHideForPlayer(i, Text:KMH[i]);
      }
    }
  }
  return 1;
}
What I am doing wrong?
Reply


Messages In This Thread
GetVehicleVelocity... - by AiVAMAN - 03.09.2009, 17:23
Re: GetVehicleVelocity... - by BlackFoX - 03.09.2009, 17:30
Re: GetVehicleVelocity... - by kc - 03.09.2009, 17:37
Re: GetVehicleVelocity... - by AiVAMAN - 03.09.2009, 17:46
Re: GetVehicleVelocity... - by BlackFoX - 03.09.2009, 17:49
Re: GetVehicleVelocity... - by AiVAMAN - 03.09.2009, 17:51
Re: GetVehicleVelocity... - by [other]FreeWall - 03.09.2009, 17:53

Forum Jump:


Users browsing this thread: 2 Guest(s)