EnableTrains

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
LU This function works in Liberty Unleashed only.

This function toggles whether trains are enabled.

Syntax

  1. void EnableTrains( bool enableTrains )

Arguments

  • enableTrains - Boolean representing if trains are enabled (true) or not (false)

Example

This will disable trains when scripts are loaded.

  1.  
  2. function onScriptLoad()
  3. {
  4. EnableTrains( false );
  5. return 1;
  6. }
  7.  

Notes

The callback onScriptLoad was used in this example. More info about it can be found in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox