Sorry I was being not smart.

Erm, I’m not entirely sure what you’re asking. A list of maps can take many different forms. You can use a DListView, a DPanelList, a DComboBox, etc.

A maplist that my gamemode could use, that would be a text file.


Wrong section

Maybe not, but the OP will have to be clearer. What are you trying to do, a map rotation system? Because there is no builtin “map list” system, therefore no map list format you can use. You’d have to make your own, which would be easy.

Maybe he is trying to ask how you get a section for maps for the gamemode to be put into? Like the TF2 maps Section and the CSS maps section?

Is there a console command for changing the map?

If you are asking for a lua format ( seeing as you can’t just put the map names in a text document and make the game execute them ) you could create a table, and then create a timer, after so many seconds the console command is run using table.random instead of the map name to make sure the maps are random.

yes, “changelevel <map_name>”

then just use
[lua]RunConsoleCommand( “changelevel”, table.random(maplist) )[/lua]
Obviously you will need to define a table before hand

[lua]local maplist = {

It was a simple maplist text file where all i had to do was list the map names.

[lua]local maplist = file.Read("…/maplist.txt")
local maps = {}

for map in maplist:gmatch("[^
\r]+") do
table.insert(maps , map)

RunConsoleCommand(“changelevel” , table.Random(maps))[/lua]