SetTrainDoorOpenRatio
клиент SET_TRAIN_DOOR_OPEN_RATIO
c
void SET_TRAIN_DOOR_OPEN_RATIO(Vehicle train, int doorIndex, float ratio);Sets the ratio that a door is open for on a train.
Параметры
- train: The train to set the door ratio for.
- doorIndex: Zero-based door index.
- ratio: A value between 0.0 (fully closed) and 1.0 (fully open).
Примеры
lua
-- open all doors on a train
local doorCount = GetTrainDoorCount(train)
for doorIndex = 0, doorCount - 1 do
SetTrainDoorOpenRatio(train, doorIndex, 1.0)
endcs
// open all doors on a train
int doorCount = API.GetTrainDoorCount(train);
for (int doorIndex = 0; doorIndex < doorCount; doorIndex++)
{
API.SetTrainDoorOpenRatio(train, doorIndex, 1.0f);
}Страница собрана автоматически из native-decls/SetTrainDoorOpenRatio.md. Нашли ошибку — поправьте исходный файл.