05.02.2013, 11:10
pawn Код:
static Float:poskm[3];
stock GetSpeed(playerid, mode = 1) {
GetVehicleVelocity(GetPlayerVehicleID(playerid), poskm[0], poskm[1], poskm[2]);
return IsPlayerInAnyVehicle(playerid) ? floatround(((floatsqroot(((poskm[0] * poskm[0]) + (poskm[1] * poskm[1]) + (poskm[2] * poskm[2]))) * (!mode ? 105.0:170.0))) * 1):0;
}