MapVar
This is my first plugin that I've actually released and it's basically a port of MistaGee's "Map Specific Commands" plugin for AMX:
http://forums.alliedmods.net/showthread.php?t=16517.
The reason I made this when Source already supports mapname.cfg files is for some mods, like Zombie Master, they don't work, so this was my fix for that. Also this is easier to manage as all map configuration is handled by one file, instead of having hundreds of mapname.cfg files.
Credits go to MistaGee for the original plugin.
Tested on Zombie Master, but should work for any game.
Features:
Partial-name support. Use an open map name.
All configurations handled by 1 file. Can be changed by cvar.
Can run any command that is run by server, including turning off plugins based on map.
Requirements:
Sourcemod 1.0.3
Install:
Copy MapVar.smx into your addons/sourcemod/plugins folder.
Copy mapvar.cfg into your addons/sourcemod/configs folder.
Usage:
All commands go into the map configuration file, which can be changed by the cvar.
Mapnames are designated as either open or closed, and begin with a bracket, [.
Open: [mapname
This means that any commands after will run on any map that contains the mapname.
Ex. [cs_office - Commands will run on cs_office AND any mapname that contains cs_office in its name.
Closed: [mapname]
This means that any commands after will run only on the map specified.
Ex. [de_dust] - Commands will run ONLY on de_dust.
Example mapvar.cfg:
Code:
[zm_actualtetris4]
mp_timelimit 50
sm plugins unload omgplugin
[zm_hax_v
mp_friendlyfire 1
Configuration:
Code:
sm_mapvar_file - designates the file to read the map-based configurations from. Default: mapvar.cfg