Skip to main content

Map Manager

The map manager is used to manipulate map rotations and sequences.


Add Map to Rotation

await RCONClientV2.maps.addMapToRotation(mapId, index);

Parameters

NameDescriptionTypeRequired
mapIdThe map ID.stringTrue
indexThe index to insert the new map at. Defaults to 0th index.numberFalse

Returns

Promise<{ success: boolean, error?: string }>


Remove Map from Rotation

await RCONClientV2.maps.removeMapFromRotation(index);

Parameters

NameDescriptionTypeRequired
indexThe index of the map to be removed.numberTrue

Returns

Promise<{ success: boolean, error?: string }>


Get the Map Sequence

await RCONClientV2.maps.getMapSequence();

Returns

Promise<{ success: boolean, error?: string, maps?: Array<string> }>


Add Map to Sequence

await RCONClientV2.maps.addMapToSequence(mapId, index);

Parameters

NameDescriptionTypeRequired
mapIdThe map ID.stringTrue
indexThe index to insert the new map at.numberTrue

Returns

Promise<{ success: boolean, error?: string }>


Remove Map from Sequence

await RCONClientV2.maps.removeMapFromSequence(index);

Parameters

NameDescriptionTypeRequired
indexThe index of the map to remove.numberTrue

Returns

Promise<{ success: boolean, error?: string }>


Move Map in Sequence

warning

newIndex Uses 1-based indexing.

await RCONClientV2.maps.moveMapInSequence(currentIndex, newIndex);

Parameters

NameDescriptionTypeRequired
currentIndexThe index of the map to move.numberTrue
currentIndexThe new index to move the map to.numberTrue

Returns

Promise<{ success: boolean, error?: string }>


Set Map Shuffling

await RCONClientV2.maps.setMapShuffling(enable);
NameDescriptionTypeRequired
enableWhether or not to enable map shuffling.booleanTrue

Returns

Promise<{ success: boolean, error?: string }>


Enable Dynamic Weather for Map

::: warning Make sure the map you're trying to enable or disable dynamic weather for supports dynamic weather. This is not validated by the library. :::

await RCONClientV2.maps.enableDynamicWeatherForMap(map, enable);
NameDescriptionTypeRequired
mapIdThe ID of the map to toggle dynamic weather for.stringTrue
enableWhether or not to enable dynamic weather for the map.booleanTrue

Returns

Promise<{ success: boolean, error?: string }>