PDA

View Full Version : Ludwig Van's Map Specific Cvars Lock and Plugin Pausing


[nFb]GraveKeeper
03-29-2004, 00:33
I did not make this plugin. I ported it from Ludwig Van's amx-mod version.

This allows you to set half-life or mod based cvars for particular maps using a config file. This allows you to lock those configs so that your admins cant change them nor can players via a vote if you have that enabled as I do. For example, you can lock sv_gravity 200 if you like for this one map. Its flexible. Has option to LOCK out cvar changes for all maps.

Just create a file called map_cvars.text and add all of the cvars and plugins for each map that you want this plugin to effect. Once you are done editing your map_cvars.text file place it inside of your amxx/custom folder.

SniperBeamer
03-29-2004, 04:28
http://forums.alliedmods.net/showthread.php?t=375

[nFb]GraveKeeper
03-29-2004, 10:58
What did I miss?

BAILOPAN
03-29-2004, 10:59
do not use #include <amxmod>

[nFb]GraveKeeper
03-29-2004, 15:16
All set I updated it.

[nFb]GraveKeeper
03-29-2004, 20:49
Can I get a check? I want to know if I did this right. I have tested it out on both windows and linux servers with success. If I get a check then I know I am porting plugins the right way and I will continue to port more plugins.

Thanks!

FroXeN
08-27-2004, 03:46
GraveKeeper]I did not make this plugin. I ported it from Ludwig Van's amx-mod version.

This allows you to set half-life or mod based cvars for particular maps using a config file. This allows you to lock those configs so that your admins cant change them nor can players via a vote if you have that enabled as I do. For example, you can lock sv_gravity 200 if you like for this one map. Its flexible. Has option to LOCK out cvar changes for all maps.

Just create a file called map_cvars.text and add all of the cvars and plugins for each map that you want this plugin to effect. Once you are done editing your map_cvars.text file place it inside of your amxx/custom folder.

create? cant it be in the zip file?

How is the txt file suppose to look for pausing plugins else or sv_gravity for certain maps?

Frylock
08-31-2004, 16:41
Yes could you please show us an example map_cvars.text file. Thanks

[nFb]GraveKeeper
08-31-2004, 23:39
Check this out:

* Command:
*
* amx_lockmapcvars -- turns on and off the locking of cvars listed with
* a "1" in the map_cvars.txt. If no cvars are listed
* this command has no effect. If cvars are listed
* with a "1", then they are by default locked
* unless this command is issued. If they have a "0"
* then this command has no effect. ADMIN_RCON access
* is required to use this command.
*
* The format of the cvar file: M = map line C = cvar line 0|1 = locked
* M mapname
* C lock0|1 cvar value
*
* Everytime you give a mapname, you must precced it with "Map". Then the
* line or lines below must start with "C" indicating you are setting a
* cvar. After the "C", leave a space, then put a number "1" or "0". "1"
* locks out any changes from votes or by lower admins. Note that ADMIN_RCON
* level admins can change this value in game for the remainder of the map
* time using amx_lockmapcvars. The values will not be changed in the file
* so next time this map is player, the value will be that which is in the
* file. "0" allows for changes to take place. So a "0" will set the default
* for map start, but leaves the cvar soft and changeable by admins or by
* voting, a "1" will set the default for a map and keeps it that way unless
* an RCON leve admin changes it. You may have as many cvars as you want.
* Once the next line is "Map" or end of file, you are done setting cvars
* for that map. You may then continue to repeat the process for each map
* you want to set special cvars for. Updated. If you want to lock cvars for
* all maps, make the map name "*allmaps", then list your cvars as you would
* with individual maps. All maps lock should be listed first in the file.
*
* To pause/unpause plugins for maps: M = map line P = plugin line U/P
* M mapname
* P ActionPause/Unpause=P|U plugin_file_name
*
* If you want to keep a plugin paused for most maps, but unpause it for one
* or a few maps, pause the plugin using the "Map *allmaps" variable and
* make sure thats the first listing in your map_cvars.txt. Then to re-
* activate the plugin for a particular map, ust the "U" variable to unpause
* the plugin. For all other plugin where you just want them to normally
* run, but for a few maps want them off, use the "P" variable. Remember to
* Preceed the plugin line with a "P", so to pause, its "P P pluginname.amx"
* and to unpause (provedied you set pause for all maps for this plugin) then
* its "P U pluginname.amx". I hope this was clear enough. See example below:
*
* Actual example of the contents of a working map_cvars.txt:
*
* Map *allmaps
* C 1 mp_hostagepenalty 0
* P P amx_ejl_weather.amx
* Map oc_bestjump3
* C 1 sv_gravity 1000
* P U amx_ejl_weather.amx
* Map starwars
* C 1 sv_gravity 100
* C 1 sv_airaccelerate -15
* C 1 mp_friendlyfire 0
* Map de_dust
* P P roll_the_dice.amx
* C 0 mp_friendlyfire 1

PuNiSh3R
02-13-2005, 10:16
I need help.
When I start my Dedicated Server on CZ I get these errors:
L 02/13/2005 - 16:11:52: [AMXX] Run time error 10 (native) (plugin "map_cvars.amxx") - debug not enabled.
L 02/13/2005 - 16:11:52: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quotes).
and if i put debug behind i get this
L 02/13/2005 - 16:09:59: [AMXX] Native error in "write_file" on line 161 (plugin "map_cvars.amxx").
What have I done wrong?

And where to put map_cvars.txt?
I don't have a amxx/custom folder.

Edit**
lol, i downloaded the amx plugin, but now i got the right plugin, but it

bitfreak
02-19-2005, 08:11
I have cs server with amxx 1.0 and map_cvars.amxx

and i got this error L 02/19/2005 - 13:55:11: [AMXX] Run time error 10 (native) (plugin "map_cvars.amxx") - debug not enabled.

L 02/19/2005 - 14:13:47: [AMXX] Native error in "write_file" on line 161 (file "/home/users/amxmodx/public_html/forums/files/map_cvars.sma").

i tried everything its not working

Breeze
03-25-2005, 12:47
If you are reaching a max of medels and or brushes an the map crashes how can i get these plugins to pause so I dont have these types of maps crash. I did a test and these maps work with me disabling certain plugins but doesn't work when the plugin pauses them. I did also move this plugin to the top of the amx plugin list an moved the ones I wanted paused to the bottom. I was wondering if this could be converted to a metamod plugin to load before the amx bsp does??? this is just a stab in the dark. But with all the great plugins that amx uses and the additions of jetpacks, bazooka's mp5 grenade launchers, sentry guns. it would be nice to be able to use them and still beable to load great maps in the cycle like greenhouse or batcave and just have them pause for that map.

Can it be done ohhh great scripters????

samalex
04-06-2005, 06:52
too bad this dosent work for pausing/unpausing metamod plugins.

I vote that to be the next possible feature for this plugin =)

onkyo
04-24-2005, 03:11
im having trouble getting this to work everything is set right i mean when i go to check plug0ins it is loaded probably but i use kz maps on my sever as well so on regular fighting maps i have it to where they pause all the kz plug-ins but it doesnt pause them and when i have it on a kz map i have the map_cvars file loaded to where i want the plug-ins to be unpaused and still doesnt work cause they were never paused and when i type in mp_limitteams 0 it doesnt set it it stays at 1. what am i doing wrong?

i have the maps_cvar.txt in the config folder and the amxmodx/folder because i wasnt really sure where it went.

MattOG
05-04-2005, 13:08
ok, if you look in the .sma the path to put the .txt file is in there. I actually changed every instance of:

addons/amxx/custom/map_cvars.txt

To read:

addons/amxmodx/configs/map_cvars.txt

and I have the map_cvars.txt file in my configs folder.

If you dont want to do this, I can either upload the .sma with the changes in, or you can create a folder called amxx in your addons folder, and a folder called custom in that. And put the txt file there.

[EDIT]:

P.s. I had problems all over the place when the file wasn't in the right folder. So make sure it is.

Forgotten00
05-19-2005, 09:49
Does this support wildcards? So say you want all surfing maps or maps with the surf_ prefix to have sv_airaccelerate 100?

Also, would it look like thiis?

Map surf_*
C 0 sv_airaccelerate 100

dkt
08-20-2005, 13:10
It seems i got problem running this plugin in amxx 1.5

dkt
08-20-2005, 13:12
It seems I have problem for this plugin in amxmodx 1.5

Fyre
11-19-2005, 15:01
I fixed this plugin for AMXX 1.60, maybe the publisher might want to edit his version :)
Fixed version is enclosed.

enrike911
11-26-2005, 23:23
work for dod or not

ThndrMom
02-05-2006, 00:32
cant get this plug in to work, though I may have installed it wrong , not sure. greenhorn here. HElp?

RasterMan
02-10-2006, 12:20
Can anyone change the hardcoded paths so it can use the amxx_configpath :?: