Scripting/Server/Functions/EnableTrains
Turns the game's trains (surface and subway) on or off for every player (v0.2.8+, default on). Off removes them from the world, on brings them back. While they run, all players see them at the same place on the track: the server only sends its clock once per join, no per-frame traffic.
Syntax
EnableTrains(bool)Arguments
- bool value
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "enabletrains" )
{
EnableTrains( true );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- ToggleRealMoney
- SetTime
- SetTimeLock
- SetTimeScale
- SetWeatherLock
- GetTime
- SetWeather
- SetVirtualWorldTime
- SetVirtualWorldWeather
- SetGamespeed
- SetGravity
- ToggleImprovedCarCam
Section: World settings
Categories: Server functions | World settings