partiusfabaa / cs2-MiniAdmin

Adds basic administrator functions
44 stars 5 forks source link

Use print_mapgroup_sv instead of maps.txt #15

Closed kus closed 2 months ago

kus commented 10 months ago

CS2 has a nice way of managing the current maps with mapgroups in gamemodes_server.txt which you can change with a server variable.

Can you use the output of print_mapgroup_sv if maps.txt does not exist? Giving the user two ways to control the maps.

This is an example of the output of print_mapgroup_sv on my server when set to deathmatch:

] print_mapgroup_sv

Map group: mg_dm
       cs_italy
       cs_office
       cs_vertigo
       de_ancient
       de_anubis
       de_dust2
       de_inferno
       de_mirage
       de_nuke
       de_overpass
       de_vertigo
       workshop/3070923343/fy_pool_day
       workshop/3071005299/de_assembly
       workshop/3070212801/de_cbble
       workshop/3070596702/de_cache
       workshop/3079872050/de_pipeline
       workshop/3075706807/de_biome
       workshop/3077599381/dm_desk
       workshop/3070581293/de_bank
       workshop/3070563536/de_lake
       workshop/3070553020/ar_dizzy
       workshop/3070552133/ar_shoots
       workshop/3070550406/de_safehouse

I have many different game modes setup on my server (competitive, deathmatch, kz, surf, 1v1, wingman etc) and I control the maps by changing the mapgroup. And I would like the maps for the current gamemode to show only.