26.02.2010, 13:14
Quote:
Originally Posted by VonLeeuwen
Code:
stock GetPlayerSpeed(playerid) { new Float:X, Float:Y, Float:Z; if(IsPlayerInAnyVehicle(playerid)) { GetVehicleVelocity(GetPlayerVehicleID(playerid), X, Y, Z); return floatround(floatmul(floatmul(floatsqroot(floatpower(floatabs(X), 2) + floatpower(floatabs(Y), 2) + floatpower(floatabs(Z), 2)), 100), 1.621371192), floatround_round); } else { GetPlayerVelocity(playerid, X, Y, Z); return floatround(floatmul(floatmul(floatsqroot(floatpower(floatabs(X), 2) + floatpower(floatabs(Y), 2) + floatpower(floatabs(Z), 2)), 100), 1.621371192), floatround_round); } } |