Raised This Month: $32 Target: $400
 8% 

Ludwig Van's Map Specific Cvars Lock and Plugin Pausing


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   BAILOPAN (72)
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-29-2004 , 00:33   Ludwig Van's Map Specific Cvars Lock and Plugin Pausing
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (map_cvars.sma - 3385 views - 10.4 KB)
File Type: zip map_cvars.zip (5.8 KB, 1859 views)
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
SniperBeamer
AMX Mod X Founder
Join Date: Jun 2003
Location: Good Old Europe
Old 03-29-2004 , 04:28  
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=375
__________________
SniperBeamer is offline
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-29-2004 , 10:58  
Reply With Quote #3

What did I miss?
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
BAILOPAN
Join Date: Jan 2004
Old 03-29-2004 , 10:59  
Reply With Quote #4

do not use #include <amxmod>
__________________
egg
BAILOPAN is offline
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-29-2004 , 15:16  
Reply With Quote #5

All set I updated it.
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-29-2004 , 20:49  
Reply With Quote #6

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!
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
FroXeN
Senior Member
Join Date: Apr 2004
Location: Freecode is a loser.
Old 08-27-2004 , 03:46   Re: Ludwig Van's Map Specific Cvars Lock and Plugin Pausing
Reply With Quote #7

Quote:
Originally Posted by [nFb
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?
__________________
Looking for friends!!!

http://Ms-Proxy.Com Join the fun!
FroXeN is offline
Send a message via ICQ to FroXeN
Frylock
New Member
Join Date: Aug 2004
Old 08-31-2004 , 16:41  
Reply With Quote #8

Yes could you please show us an example map_cvars.text file. Thanks
Frylock is offline
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 08-31-2004 , 23:39  
Reply With Quote #9

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
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
PuNiSh3R
New Member
Join Date: Feb 2005
Location: Norway
Old 02-13-2005 , 10:16  
Reply With Quote #10

I need help.
When I start my Dedicated Server on CZ I get these errors:
Code:
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
Code:
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
PuNiSh3R is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode