示例#1
0
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
***********************************************
'''


print "Content-Type: text/html; charset=UTF-8"     # HTML is following
print                                              # blank line, end of headers

from optparse import OptionParser
from common import setPluginForAmxmodx

parser = OptionParser()
parser.add_option("-s", "--server-path", action="store", type="string", dest="serverPath")
parser.add_option("-a", "--addon-path", action="store", type="string", dest="addonPath")
parser.add_option("-p", "--steam-id", action="store", type="string", dest="steamId")
parser.add_option("-g")
parser.add_option("-m")

(options, args) = parser.parse_args(args=None, values=None)
serverPath = options.serverPath
addonPath = options.addonPath
steamId = options.steamId

plugin = "resetscore.amxx"
modules = ['cstrike']

setPluginForAmxmodx(serverPath + "/" + addonPath, plugin, modules)
from common import setPluginForAmxmodx

parser = OptionParser()
parser.add_option("-s",
                  "--server-path",
                  action="store",
                  type="string",
                  dest="serverPath")
parser.add_option("-a",
                  "--addon-path",
                  action="store",
                  type="string",
                  dest="addonPath")
parser.add_option("-p",
                  "--steam-id",
                  action="store",
                  type="string",
                  dest="steamId")
parser.add_option("-g")
parser.add_option("-m")

(options, args) = parser.parse_args(args=None, values=None)
serverPath = options.serverPath
addonPath = options.addonPath
steamId = options.steamId

plugin = "say_restart.amxx"
modules = None

setPluginForAmxmodx(serverPath + "/" + addonPath, plugin, modules)