Skip to Content
ResourcesMapmanagermapmanager

About

mapmanager is an included resource that manages map and game-type resources: starting and stopping them, tracking which one is currently active, and checking compatibility between a given map and game type.

Exports

Exports are called through exports.mapmanager:exportName(args).

Server

  • getCurrentGameType - Returns the name of the current game type resource
  • getCurrentMap - Returns the name of the current map resource
  • changeGameType - Stops the current game type (and map, if incompatible), then starts the given game type
  • changeMap - Stops the current map and starts the given one
  • doesMapSupportGameType - Returns whether a map resource supports a given game type
  • getMaps - Returns a table of all available map resources
  • roundEnded - Ends the current round

Events

Client

  • getMapDirectives - Fires to let scripts register map directives through the provided add function
  • onClientGameTypeStart - Fires when a game type resource has started
  • onClientGameTypeStop - Fires when a game type resource has stopped
  • onClientMapStart - Fires when a map resource has started
  • onClientMapStop - Fires when a map resource has stopped