示例#1
0
def load():
    global adverts, time_between_advert, adverts_chat_area, adverts_top_left, advert_col_red, advert_col_green, advert_col_blue, advert_dead_only, adverts_bottom_area, xaadvertlist

    # make config vars
    adverts = xaadvert.setting.createVariable('adverts', 1,
                                              'Turns adverts on or off')
    time_between_advert = xaadvert.setting.createVariable(
        'time_between_advert', 120, 'Time between adverts displayed')
    adverts_chat_area = xaadvert.setting.createVariable(
        'adverts_chat_area', 1, 'Allow adverts in chat area of screen')
    adverts_top_left = xaadvert.setting.createVariable(
        'adverts_top_left', 1, 'Allow adverts in top left corner of screen')
    advert_col_red = xaadvert.setting.createVariable(
        'advert_col_red', 0, 'Red component colour of adverts (255 = max)')
    advert_col_green = xaadvert.setting.createVariable(
        'advert_col_green', 0, 'Green component colour of adverts (255 = max)')
    advert_col_blue = xaadvert.setting.createVariable(
        'advert_col_blue', 255, 'Blue component colour of adverts (255 = max)')
    advert_dead_only = xaadvert.setting.createVariable(
        'advert_dead_only', 0,
        'Specify if all players or only dead players can see adverts')
    adverts_bottom_area = xaadvert.setting.createVariable(
        'adverts_bottom_area', 0, 'Show adverts in the hint text area')

    # get advert list
    if xa.isManiMode():
        xaadvertlist = xaadvert.configparser.getList(
            'cfg/mani_admin_plugin/adverts.txt', True)
    else:
        xaadvertlist = xaadvert.configparser.getList('adverts.txt')

    # start timer
    gamethread.delayedname(time_between_advert, 'adverts', display_advert)
示例#2
0
def es_map_start(event_var):
    '''
    Reload the reserved lists on map start
    '''
    global xaReservedList
    # load the list of reserved players
    if xa.isManiMode():
        xaReservedList = xareserveslots.configparser.getList("cfg/mani_admin_plugin/reserveslots.txt", True)
    else:
        xaReservedList = None
    
    if not xaReservedList:
        xaReservedList = xareserveslots.configparser.getList("reserved_slots_list.txt")
    else:
        xaReservedList.extend(xareserveslots.configparser.getList("reserved_slots_list.txt"))
def returnReservedStatus(x):
    '''
    Checks via various methods if the player x has a reserved slot
     - RETURNS False if they do have one (For playerlib purposes)
    '''
    if isinstance(x, str):
        x = playerlib.getPlayer(x)
    if xaReservedList:
        # if we have a list of reserved players then check x's steam id and return false if they are in the list
        if x.attributes['steamid'] in xaReservedList:
            return False

    if xa.isManiMode():
        # if we have mani mode on we can test for the "N" immunity for reserve slot kick immunity
        if xareserveslots.isUseridAuthorized(int(x), "n", "immunity"):
            return False
    # and finally check that they are not on the reserved list
    if xareserveslots.isUseridAuthorized(int(x), "use_slot"):
        return False
示例#4
0
def returnReservedStatus(x):
    '''
    Checks via various methods if the player x has a reserved slot
     - RETURNS False if they do have one (For playerlib purposes)
    '''
    if isinstance(x, str):
        x = playerlib.getPlayer(x)
    if xaReservedList:
        # if we have a list of reserved players then check x's steam id and return false if they are in the list
        if x.attributes['steamid'] in xaReservedList:
            return False

    if xa.isManiMode():
        # if we have mani mode on we can test for the "N" immunity for reserve slot kick immunity
        if xareserveslots.isUseridAuthorized(int(x), "n", "immunity"):
            return False
    # and finally check that they are not on the reserved list
    if xareserveslots.isUseridAuthorized(int(x), "use_slot"):
        return False
示例#5
0
def load(): 
   global adverts, time_between_advert, adverts_chat_area, adverts_top_left, advert_col_red, advert_col_green, advert_col_blue, advert_dead_only, adverts_bottom_area, xaadvertlist 

   # make config vars 
   adverts              = xaadvert.setting.createVariable('adverts', 1, 'Turns adverts on or off') 
   time_between_advert  = xaadvert.setting.createVariable('time_between_advert', 120, 'Time between adverts displayed') 
   adverts_chat_area    = xaadvert.setting.createVariable('adverts_chat_area', 1, 'Allow adverts in chat area of screen') 
   adverts_top_left     = xaadvert.setting.createVariable('adverts_top_left', 1, 'Allow adverts in top left corner of screen') 
   advert_col_red       = xaadvert.setting.createVariable('advert_col_red', 0, 'Red component colour of adverts (255 = max)') 
   advert_col_green     = xaadvert.setting.createVariable('advert_col_green', 0, 'Green component colour of adverts (255 = max)') 
   advert_col_blue      = xaadvert.setting.createVariable('advert_col_blue', 255, 'Blue component colour of adverts (255 = max)') 
   advert_dead_only     = xaadvert.setting.createVariable('advert_dead_only', 0, 'Specify if all players or only dead players can see adverts') 
   adverts_bottom_area  = xaadvert.setting.createVariable('adverts_bottom_area', 0, 'Show adverts in the hint text area') 
    
   # get advert list 
   if xa.isManiMode(): 
      xaadvertlist = xaadvert.configparser.getList('cfg/mani_admin_plugin/adverts.txt', True) 
   else: 
      xaadvertlist = xaadvert.configparser.getList('adverts.txt') 
    
   # start timer 
   gamethread.delayedname(time_between_advert, 'adverts', display_advert) 
示例#6
0
info.author = "Don"
info.basename = "xaskins"

skinmenu = [
    'Admin T', 'Admin CT', 'Public T', 'Public CT', 'Reserved T',
    'Reserved CT', 'Misc'
]
skinnames = [
    'admin_t', 'admin_ct', 'public_t', 'public_ct', 'reserved_t',
    'reserved_ct', 'misc'
]
skinlist = {}
playermenu = {}
skins_downloadable = 1

if xa.isManiMode():
    xaskins_skinfiles_path = xa.gamedir() + "/cfg/mani_admin_plugin/skins/"
else:
    xaskins_skinfiles_path = xa.gamedir() + "/cfg/xa/skins/"

###############
### GLOBALS ###
###############

xaskins = xa.register(info.basename)
xalanguage = xaskins.language.getLanguage()

players = {}
players['exists'] = xaskins.playerdata.createUserSetting("exists")
players['admin_t'] = xaskins.playerdata.createUserSetting("admin_t")
players['admin_ct'] = xaskins.playerdata.createUserSetting("admin_ct")
示例#7
0
playerkills = {}
playerheads = {}
firstblood = False

#plugin information
info = es.AddonInfo()
info.name           = "Quake Sounds"
info.version        = "0.2"
info.author         = "Hunter"
info.basename       = "xaquakesounds"

xaquakesounds                       = xa.register(info.basename)
xalanguage                          = xaquakesounds.language.getLanguage()
xaplayerdata_quakesounds            = xaquakesounds.playerdata.createUserSetting('quakesounds')

if xa.isManiMode():
    xaquakesoundslist               = xaquakesounds.configparser.getAliasList('cfg/mani_admin_plugin/quakesoundlist.txt', True)
else:
    xaquakesoundslist               = xaquakesounds.configparser.getAliasList('quakesoundlist.txt')

quake_sounds                        = xaquakesounds.setting.createVariable('quake_sounds', '1', '0 = off, 1 = enable Quake Sounds')
quake_sounds_download               = xaquakesounds.setting.createVariable('quake_auto_download', '0', '0 = Don\'t auto download files to client, 1 = automatically download files to client')
quake_sounds_settings               = xaquakesounds.setting.createVariable('player_settings_quake', '1', '0 = player settings default to off, 1 = player settings default to on')
quake_kill_streak_mode              = xaquakesounds.setting.createVariable('quake_kill_streak_mode', '0', 'Reset kill streaks per round 1 = per round/death, 0 = per death')
quake_humiliation_mode              = xaquakesounds.setting.createVariable('quake_humiliation_mode', '1', '0 = off, 1 = all players hear it, 2 = players involved hear it, 3 = attacker hears it, 4 = victim hears it')
quake_humiliation_visual_mode       = xaquakesounds.setting.createVariable('quake_humiliation_visual_mode', '1', '0 = off, 1 = all players see it, 2 = players involved see it, 3 = attacker sees it, 4 = victim sees it')
quake_humiliation_weapon            = xaquakesounds.setting.createVariable('quake_humiliation_weapon', 'knife', 'Weapon that triggers the humiliation sound')
quake_humiliation_weapon2           = xaquakesounds.setting.createVariable('quake_humiliation_weapon2', '', 'Second weapon that triggers the humiliation sound')
quake_firstblood_mode               = xaquakesounds.setting.createVariable('quake_firstblood_mode', '1', '0 = off, 1 = all players hear it, 2 = players involved hear it, 3 = attacker hears it, 4 = victim hears it')
quake_firstblood_visual_mode        = xaquakesounds.setting.createVariable('quake_firstblood_visual_mode', '1', '0 = off, 1 = all players see it, 2 = players involved see it, 3 = attacker sees it, 4 = victim sees it')
quake_firstblood_reset_per_round    = xaquakesounds.setting.createVariable('quake_firstblood_reset_per_round', '1', 'CSS Only, 1 = reset per round, 0 = per map')