05.02.2011, 12:42
Ehm okay I'll try
EDIT:
Thanks, it worked
This's the function btw
EDIT:
Thanks, it worked
This's the function btw
pawn Код:
func:GetVehicleSpeed(vehicleid)
{
new Float:v_vX, Float:v_vY, Float:v_vZ, Float:XYZ, Float:_ret;
GetVehicleVelocity(vehicleid, v_vX, v_vY, v_vZ);
_ret = floatmul( ( ( (v_vX) + (v_vX) ) * 2 ) + ( ( (v_vY) + (v_vY) ) * 2 ) + ( ( (v_vZ) + (v_vZ) ) * 2 ) , v_vX + v_vY + v_vZ);
_ret = floatpower(_ret, 2);
XYZ = v_vX + v_vY + v_vZ;
if(v_vX > 0 || v_vY > 0 || v_vX == 0 || v_vY == 0)
return floatround(floatabs(_ret + XYZ * 99), floatround_ceil);
elseif(v_vX < 0 || v_vY < 0)
return floatround(floatabs(_ret + -XYZ * 99), floatround_ceil);
return floatround(floatabs(_ret + XYZ * 99), floatround_ceil);
}