Raised This Month: $51 Target: $400
 12% 

Map Configuration Switcher (Originally Custom Map Configs)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 04-21-2005 , 21:44   Map Configuration Switcher (Originally Custom Map Configs)
Reply With Quote #1

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
*
*/
Attached Files
File Type: sma Get Plugin or Get Source (mapconfigswitcher.sma - 1163 views - 1.6 KB)
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 04-21-2005 , 23:01  
Reply With Quote #2

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

This comes with AMXMODX
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 04-22-2005 , 01:21  
Reply With Quote #3

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.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 04-22-2005 , 01:24  
Reply With Quote #4

well isn't it this?

http://forums.alliedmods.net/showthread.php?t=11564
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 04-22-2005 , 01:27  
Reply With Quote #5

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.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 12-13-2005 , 19:18  
Reply With Quote #6

Redundant. Moved to Unapproved/Old Plugins forum.
__________________
twistedeuphoria 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 00:17.


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