Vehicle speed
#5

Quote:
Originally Posted by Jakku
Посмотреть сообщение
Is this efficient enough?

pawn Код:
GetVehicleSpeed(vehicleid)
{
    new Float:Vx, Float:Vy, Float:Vz;
    GetVehicleVelocity(vehicleid, Vx, Vy, Vz);
    new Float:rtn;
    rtn = floatsqroot(floatpower(Vx*100,2) + floatpower(Vy*100,2));
    rtn = floatsqroot(floatpower(rtn,2) + floatpower(Vz*100,2));
    return floatround(rtn);
}
Not really sure how to tell. Although, I need a function which can allow me to retrieve it in MPH and KPH.
Reply


Messages In This Thread
Vehicle speed - by Scenario - 14.01.2012, 22:18
Re: Vehicle speed - by Jakku - 14.01.2012, 22:20
Re: Vehicle speed - by Laronic - 14.01.2012, 22:20
Re: Vehicle speed - by Steven82 - 14.01.2012, 22:21
Re: Vehicle speed - by Scenario - 14.01.2012, 22:21
Re: Vehicle speed - by iTorran - 14.01.2012, 22:36
Re: Vehicle speed - by Virtual1ty - 14.01.2012, 22:40
Re: Vehicle speed - by Scenario - 14.01.2012, 23:21

Forum Jump:


Users browsing this thread: 1 Guest(s)