[Pedido] Funзгo para pegar a velocidade de um veнculo.
#7

Quote:
Originally Posted by PT
Посмотреть сообщение
eu e o Pottus usamos esta funcao:


pawn Код:
GetVehicleSpeed(vehicleid)
{
    new Float:V[3];
    GetVehicleVelocity(vehicleid, V[0], V[1], V[2]);
    return floatround(floatsqroot(V[0] * V[0] + V[1] * V[1] + V[2] * V[2]) * 180.00);
}
infernus vai a 223 km/s
Meu script chegou em algo quase igual kk
pawn Код:
stock GetPlayerSpeed(playerid)
{
    new Float:Pos[3];
    GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
    return floatround(floatsqroot(Pos[0] * Pos[0] + Pos[1] * Pos[1] + Pos[2] * Pos[2]) * 220.00);
}
Nгo ficou muito real mas irei optimizar com o tempo.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)