SA-MP Forums Archive
[Ajuda] Converter MPH para KM/H - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Converter MPH para KM/H (/showthread.php?tid=610986)



Converter MPH para KM/H - iWindows - 01.07.2016

Queria saber como converto essa velocidade (Milhas por hora) para Kilometros por hora

Код:
stock Float:GetPlayerSpeed(playerid)
{
	static Float:velocity[3];

	if (IsPlayerInAnyVehicle(playerid))
	    GetVehicleVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
	else
	    GetPlayerVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);

	return floatsqroot((velocity[0] * velocity[0]) + (velocity[1] * velocity[1]) + (velocity[2] * velocity[2])) * 100.0;
}



Re: Converter MPH para KM/H - Whoo - 01.07.2016

Vc tem que saber quantos vale uma milha.

1 milha == 1,609 km
Entгo faz o calculo m x k