02.01.2012, 10:15
So,i'm creating and anticheat and i've this stock:
This detects MPH speed,i need to detect KMH speed,how?Thanks.
pawn Код:
stock GetVehicleSpeed(vehicleid)
{
new Float:v_vX, Float:v_vY, Float:v_vZ, Float:retres;
GetVehicleVelocity(vehicleid, v_vX, v_vY, v_vZ);
retres = floatsqroot(floatabs(floatpower(v_vX + v_vY + v_vZ, 2)));
return floatround(retres * 100, floatround_ceil);
}