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

MapVar


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TheDOO
Member
Join Date: Nov 2007
Plugin ID:
472
Plugin Version:
1.0.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Map-based Configuration
    Unapprover:
    Reason for Unapproving:
    Duplicate plugin.
    Old 07-19-2008 , 10:53   MapVar
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (MapVar.sp - 821 views - 2.9 KB)
    File Type: cfg mapvar.cfg (328 Bytes, 255 views)
    TheDOO is offline
    ifx
    Senior Member
    Join Date: Apr 2008
    Old 07-19-2008 , 15:49   Re: MapVar
    Reply With Quote #2

    great! that's what i want, i will test it, thank you!
    ifx is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 07-19-2008 , 18:32   Re: MapVar
    Reply With Quote #4

    This is like the 2nd in the past month, plus it comes built in with the new engine...
    __________________

    DontWannaName is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 07-19-2008 , 21:20   Re: MapVar
    Reply With Quote #5

    As he said, Zombie Master apparently doesn't have map specific configs built in. But yes, there are plenty of plugins that already do this.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    TheDOO
    Member
    Join Date: Nov 2007
    Old 07-19-2008 , 23:20   Re: MapVar
    Reply With Quote #6

    I know there's been others but they didn't do what I needed them to do. Some of them wouldn't let me turn off plugins, they only allowed a cvar and a value. Also they use multiple files, which if you have a large maplist, can be cumbersome to manage. And I don't think any of them support partial names.
    TheDOO is offline
    jones ray
    Member
    Join Date: Aug 2007
    Old 07-20-2008 , 06:26   Re: MapVar
    Reply With Quote #7

    Looks neat TY
    jones ray is offline
    PStar
    Veteran Member
    Join Date: Mar 2008
    Old 07-20-2008 , 07:05   Re: MapVar
    Reply With Quote #8

    Quote:
    Originally Posted by TheDOO View Post
    And I don't think any of them support partial names.
    Nearly all of them.
    PStar is offline
    TheDOO
    Member
    Join Date: Nov 2007
    Old 07-20-2008 , 16:55   Re: MapVar
    Reply With Quote #9

    Quote:
    Originally Posted by PStar View Post
    Nearly all of them.
    Only other one that can do partial name matching is: http://forums.alliedmods.net/showthread.php?p=607079. But again that is multiple files. Prefix matching does not equal partial name matching.
    TheDOO is offline
    TheDOO
    Member
    Join Date: Nov 2007
    Old 07-26-2008 , 10:21   Re: MapVar
    Reply With Quote #10

    sooo.... are there any problems or anything? Can't really fix or improve on anything if there's no feedback .
    TheDOO is offline
    Reply


    Thread Tools
    Display Modes

    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 15:53.


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