[PEDIDO] Velocidade Apй outa de Carro
#3

Apague essa funзгo e coloque :


pawn Код:
//No Final do GM:

stock GetPlayerSpeed(playerid,bool:kmh_anzahl)
{
    if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 0;
    new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
    GetPlayerVelocity(playerid,Vx,Vy,Vz);
    rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
    return kmh_anzahl?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}


stock GetPlayerVehicleSpeed(playerid,bool:kmh_anzahl)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;
    new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
    GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
    rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
    return kmh_anzahl?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}

Ambas retornam 0, a primeira funзгo se o jogador nгo estiver a pй e a segunda se o jogador nгo estiver em um veнculo.



Espero ter ajudado .
Reply


Messages In This Thread
RESOLVIDO - by Th4 L&noN! - 29.04.2012, 21:59
Re: [PEIDO] Velocidade Apй outa de Carro - by Matheus_Ecko - 29.04.2012, 22:06
Re: [PEDIDO] Velocidade Apй outa de Carro - by rjjj - 29.04.2012, 23:49
RESOLVIDO - by Th4 L&noN! - 30.04.2012, 00:30

Forum Jump:


Users browsing this thread: 1 Guest(s)