Speedometer just gave up
#1

Ive been using the following function on my server, and it suddenly is not working properly. It starts at 49 when im sitting still, then goes up to 56 and back to 49 when driving. Wtf?

pawn Код:
stock PlayerSpeed(playerid)
{
    new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
    vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
    final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
    final_speed_int = floatround(final_speed,floatround_round);
    format(speed_string,256,"%i",final_speed_int);
    return speed_string;
}
Reply


Messages In This Thread
Speedometer just gave up - by Rokzlive - 15.01.2012, 15:34
Re: Speedometer just gave up - by Rokzlive - 15.01.2012, 15:50

Forum Jump:


Users browsing this thread: 1 Guest(s)