SetMapLayer
Switches a map layer on or off for every player.
Everything in the layer - objects and removals - shows or goes in every game at once, and the server’s collision follows. A new name makes the layer. The switch is written into the map: it is still so after a restart.
Syntax
Section titled “Syntax”SetMapLayer(name, on)| Parameter | Type | |
|---|---|---|
name |
string | the layer |
on |
boolean | true shows it |
Returns
Section titled “Returns”boolean - true; false and the reason when the server has no map
Example
Section titled “Example”-- the winter market stands from the first snow to the thawSetMapLayer("winter_market", IsWinter())See also
Section titled “See also”GetMapLayers · CreateMapObject · the The server’s map group of the index
