RU/IsTrainChainEngine
Jump to navigation
Jump to search
Эта функция проверяет если поезд имеет цепь двигателей (перемещение оставшейся цепи вагонов) или нет.
Синтаксис
bool isTrainChainEngine ( vehicle theTrain )
Аргументы
- theTrain: a train to check if it's a chain engine or not.
Возвращает
Возвращает true если поезд был передан в функцию и это цепь вагонов. Иначе возвращает false.
Пример
function checkTrainChainEngine() if isPedInVehicle(localPlayer) and getVehicleType(getPedOccupiedVehicle(localPlayer)) == "Train" then local train = getPedOccupiedVehicle(localPlayer) outputChatBox("Ваш поезд " .. (isTrainChainEngine(train) и "является" или "не является") .. " цепью вагонов.", 255, 128, 0) else outputChatBox("Вы должны находиться в поезде чтобы использовать эту команду.", 255, 0, 0) end end addCommandHandler("isthistrainachainengine", checkTrainChainEngine)
Смотрите также
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates