MPH and KMH
#1

So,i'm creating and anticheat and i've this stock:

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);
}
This detects MPH speed,i need to detect KMH speed,how?Thanks.
Reply
#2

You could multiply the value that you get by *1.6 - this would convert it to KMH.
Reply
#3

return (floatround(retres * 100, floatround_ceil)*1.6);
Reply
#4

Thanks to both
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)