Hi I've got no knowledge of Polish language so I will write in English 😄
This code will set the train as "deactivated / cold" (AI will not move):
PlayerTrainset.SetState(DynamicState.dsCold, TrainsetState.tsDeactivation, true)
This code will set the train as "stopped" (AI will not move):
PlayerTrainset.SetState(DynamicState.dsStop, TrainsetState.tsActivation, true)
This code will set the train as "stopped, but in drive position" (AI will not move):
PlayerTrainset.SetState(DynamicState.dsStop, TrainsetState.tsTrain, true)
This code will set the train as "normal drive" (for ET22 and EN57 AccSlow and AccFast has differences):
PlayerTrainset.SetState(DynamicState.dcAccFast, TrainsetState.tsTrain, true)
This code will set the train as "drive in shunting mode":
PlayerTrainset.SetState(DynamicState.dsAccFast, TrainsetState.tsShunting, true)
Hope this helps! 😄