Vehicle speed
#6

pawn Код:
// Taken from gLibrary - Gamer93

stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
{
    new Float:speed_x,Float:speed_y,Float:speed_z,Float:temp_speed;
    GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
    if(UseMPH == 0)
    {
        temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
    } else {
        temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
    }
    floatround(temp_speed,floatround_round);return temp_speed;
}
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)