Speed Float
#2

pawn Код:
//If you meant getting player's speed Here's a stock that gets it
stock GetPlayerSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}
Reply


Messages In This Thread
Speed Float - by Akcent_Voltaj - 24.01.2013, 15:29
Re: Speed Float - by DaRk_RaiN - 24.01.2013, 15:31
Re: Speed Float - by Sinner - 24.01.2013, 15:40
Re: Speed Float - by LarzI - 24.01.2013, 15:53
Re: Speed Float - by Akcent_Voltaj - 24.01.2013, 17:19
Re: Speed Float - by Akcent_Voltaj - 24.01.2013, 20:40
Re: Speed Float - by Akcent_Voltaj - 25.01.2013, 11:45
Re: Speed Float - by SAMPHacker - 25.01.2013, 11:56
Re: Speed Float - by Akcent_Voltaj - 25.01.2013, 12:02
Re: Speed Float - by LarzI - 25.01.2013, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)