# Пользовательские дополнения

На главную

## transport.GetShieldStrength( transportId, side )

Возвращает информацию о силе щита транспортного средства по какой-либо стороне (SHIP_SIDE_...). Сила представлена парой - значение/максимальное значение. Если транспорт не найден, то возвращает 0/0.

    -- библиотека:
    transport

    -- объявление:
    function GetShieldStrength( transportId, side )

    -- параметры:
    transportId: ObjectId (not nil) -- идентификатор транспортного средства
    side: number (enum SHIP_SIDE_...) - сторона

    -- возвращаемые значения -
    table - таблица, содержащая поля:
      value: number (int) - сила щита
      maxValue: number (int) - максимальная сила щита

    -- пример:
    local transportId = unit.GetTransport( avatar.GetId() )
    if transportId then
      local strength = transport.GetShieldStrength( transportId, SHIP_SIDE_FRONT )
      if strength then
        LogInfo( strength.value, " / ", strength.maxValue )
      end
    end

#### Search: "CategoryLuaApi" "CategoryTransport"

EnumCriticalMalfunctionType
EnumShipSide
EventAstrolabeInfoChanged
EventAvatarBindedTransportChanged
EventAvatarTransportChanged
EventReactorCountDown
EventReactorCountDownCancelled
EventShipDamageReceived
EventTransportAccelerationTargetChanged
EventTransportAngularVelocityChanged
EventTransportCriticalMalfunction
EventTransportDespawned
EventTransportDevicesChanged
EventTransportDirectionChanged
EventTransportEnergyChanged
EventTransportHorizontalVelocityChanged
EventTransportInsightChanged
EventTransportObservingFinished
EventTransportObservingStarted
EventTransportPosChanged
EventTransportsChanged
EventTransportShieldChanged
EventTransportShipInfoChanged
EventTransportSpawned
EventTransportVerticalVelocityChanged
FunctionAstralAstrolabeJump
FunctionAstralCheckJump
FunctionAstralGetAstrolabeDeniedPlayers
FunctionAvatarGetBindedTransport
FunctionAvatarGetObservedAstralUnit
FunctionAvatarGetObservedTransport
FunctionAvatarGetTransportList
FunctionDeviceGetNavigatorTargetChests
FunctionDeviceNavigatorGetTarget
FunctionDeviceNavigatorGetZoomedObject
FunctionDeviceNavigatorSetTarget
FunctionTransportCanDrawInterface
FunctionTransportGetAcceleratorNominalMass
FunctionTransportGetDevices
FunctionTransportGetDirection
FunctionTransportGetEnergy
FunctionTransportGetHealthMaximum
FunctionTransportGetInsight
FunctionTransportGetMass
FunctionTransportGetPosition
FunctionTransportGetShieldStrength
FunctionTransportGetShipInfo
FunctionTransportGetVelocities
FunctionUnitGetTransport

CategoryLuaApi CategoryFunction CategoryTransport

На главную