GetPlayerSpeed
#3

I have this one in my [MV]_cPanel:

pawn Код:
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
GetPlayerSpeed - by wumpyc - 31.10.2011, 20:15
Re: GetPlayerSpeed - by Mean - 31.10.2011, 21:34
Re: GetPlayerSpeed - by Michael@Belgium - 31.10.2011, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)