The Changelevel command changes the map to the given one, optionally after a delay in seconds: /changelevel <map> [delay]. The map has to be named exactly, and the names of the maps are suggested while it is typed. It refuses a map the server does not have, and runs the FLSaveData and ServerRestart hooks before the change, as the Restart command does.

Summary

Methods

Changes the map after an optional delay, saving data first, and notifies staff.

Methods

CMD:on_run(actor, map_name, delay)

shared plugins/admin/plugin/commands/sh_changelevel.lua:21

Changes the map after an optional delay, saving data first, and notifies staff. The map has to be named exactly as its file is, without the .bsp extension, in any case; the caller is told if the server has no such map.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • map_name String map name without the .bsp extension
  • delay String optional, defaults to 0 delay in seconds

Defined in