AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Map Configuration Switcher (Originally Custom Map Configs) (https://forums.alliedmods.net/showthread.php?t=12698)

Atreus 04-21-2005 21:44

Map Configuration Switcher (Originally Custom Map Configs)
 
1 Attachment(s)
Okay. First things first, I should say that this is my first real plugin so go easy on me. This is a modified version (as seen below) of the AMX Mod Change Map Configs plugin. I ported it and made a major change. I used regex so that if you are on a surf map, it loads surf.cfg and if you are not, it loads normal.cfg.

Obviously, settings for FY and other types of maps can can be added as well. Feel free to give suggestions. In fact, please give me as many suggestions as possible for improving this script including, perhaps, a way to add types of maps without having to recompile the SMA every time you want to add a new type.

Oh, yes. There was one thing that I must ask - When modifying the script, there was a variable called 'len' which was uncalled throughout the plugin. If anyone can suggest how to change the line(s) with 'new len' in them, please do.

Thanks for any advice to make this more efficient.

This has been tested and works flawlessly on my server.

Code:

/* AMX Mod X script.
*
* Map Configuration Switcher 1.0.0
*  Set map-specific variables and commands
*
* Originally by JustinHoMi ([email protected])
* Modified by Atreus ([email protected])
* http://www.animecorporation.com
*
* Place your custom configs in the designated folder
*  (addons\amxmodx\configs by default)
* Configs should be in the format "mapname.cfg"
* Insert any cvar or cmd to be executed at map change
*
* Changelog:
*  1.0.0 - Completely reworked the script.
        - Updated to AMXX.
        - When on a surf map, uses "surf.cfg". When on a non surf map, uses "normal.cfg".
*  0.9.9 - Added translations support for AMX Mod 0.9.9
*  0.61  - Changes load delay to 6s (to work better with SQL ServerCfg)
*  0.6  - Execs configs rather than loading file
*        - Delays execution for 5s after map changes
*  0.5  - Initial release
*
*/


XxKpAznGuyxX 04-21-2005 23:01

http://forums.alliedmods.net/showthread.php?t=6516

This comes with AMXMODX

Atreus 04-22-2005 01:21

Quote:

Originally Posted by XxKpAznGuyxX
http://forums.alliedmods.net/showthread.php?t=6516

This comes with AMXMODX

No it doesn't...

That is for each individual map, which is a pain. This reads the type of map overall so if you like to go by surf, or FY, etc, you don't have to make a config for every single map you have you don't have to.

Just thinking of making a special config for every surf map I have is terrible.

Edit: essentially the beginnings of what Bry asked on page 2.

XxKpAznGuyxX 04-22-2005 01:24

well isn't it this?

http://forums.alliedmods.net/showthread.php?t=11564

Atreus 04-22-2005 01:27

Quote:

Originally Posted by XxKpAznGuyxX

Yes. I must have searched 5+ times for something like that and didn't find it...that's why I made this to begin withi :( Shot down.

twistedeuphoria 12-13-2005 19:18

Redundant. Moved to Unapproved/Old Plugins forum.


All times are GMT -4. The time now is 07:09.

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