from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player # Weapons from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_bomb_defused_levels' info.title = 'GG Welcome Message' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 560 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_bomb_defused_levels'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_bomb_defused_levels = es.ServerVar('gg_bomb_defused_levels') gg_bomb_defused_skip_knife = es.ServerVar('gg_bomb_defused_skip_knife') gg_bomb_defused_skip_nade = es.ServerVar('gg_bomb_defused_skip_nade') # ============================================================================= # >> GAME EVENTS # ============================================================================= def bomb_defused(event_var): # Get the player instance ggPlayer = Player(event_var['userid'])
from gungame51.core.players.players import UseridError from gungame51.core.players.shortcuts import setAttribute from gungame51.core.players.shortcuts import deleteAttribute from gungame51.core.messaging.shortcuts import centermsg from gungame51.core.messaging.shortcuts import saytext2 from gungame51.core.events import GG_Multi_Level # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_multi_level' info.title = 'GG Multi Level' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 571 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_multi_level'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_multi_level = es.ServerVar("gg_multi_level") gg_multi_level_tk_reset = es.ServerVar("gg_multi_level_tk_reset") gg_multi_level_speed = es.ServerVar("gg_multi_level_speed") gg_multi_level_gravity = es.ServerVar("gg_multi_level_gravity") # Dict of players currently getting the multi-level boost and the sound played # for them currentMultiLevel = {} # =============================================================================
from gungame51.modules.active import ActiveInfo # Addons from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_suicide_punish' info.title = 'GG Suicide Punish' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 627 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_suicide_punish'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Get the es.ServerVar() instance of "gg_suicide_punish" gg_suicide_punish = es.ServerVar('gg_suicide_punish') # Store a list of those who recently changed teams, to not punish them if they # committed suicide to do so recentTeamChange = [] # ============================================================================= # >> GAME EVENTS
# Addons from gungame51.core.addons.shortcuts import AddonInfo # Messaging from gungame51.core.messaging.shortcuts import centermsg from gungame51.core.messaging.shortcuts import saytext2 from gungame51.core.messaging.shortcuts import toptext # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_winner_messages' info.title = 'GG Winner Messages' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 563 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_winner_messages'] # ============================================================================= # >> GAME EVENTS # ============================================================================= def gg_win(event_var): # Store the winner's name name = event_var['es_attackername'] # Store the winner's index index = int(event_var['es_attackerindex']) # Send chat message for player winning the match saytext2('#human', index, 'PlayerWon', {'player': name})
# Players from gungame51.core.players.shortcuts import Player from gungame51.core.players.shortcuts import setAttribute # Weapons from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_hostage_rescued_levels' info.title = 'GG Hostage Rescued' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 549 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_hostage_rescued_levels'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_hostage_rescued_levels = es.ServerVar('gg_hostage_rescued_levels') gg_hostage_rescued_rescues = es.ServerVar('gg_hostage_rescued_rescues') gg_hostage_rescued_skip_knife = es.ServerVar('gg_hostage_rescued_skip_knife') gg_hostage_rescued_skip_nade = es.ServerVar('gg_hostage_rescued_skip_nade') # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): # Start all current players hostage rescue counters
from gungame51.core.players.shortcuts import Player from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_level_multikill from gungame51.core.weapons.shortcuts import get_total_levels from gungame51.core.players.shortcuts import setAttribute from gungame51.core.messaging.shortcuts import saytext2 # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_nade_bonus' info.title = 'GG Grenade Bonus' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 571 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_nade_bonus'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Server Vars gg_nade_bonus = es.ServerVar('gg_nade_bonus') gg_nade_bonus_mode = es.ServerVar('gg_nade_bonus_mode') gg_nade_bonus_reset = es.ServerVar('gg_nade_bonus_reset') # Weapon list list_Weapons = getWeaponNameList('#all') # ============================================================================= # >> LOAD & UNLOAD
from gungame51.core.addons.shortcuts import AddonInfo from gungame51.core.players.shortcuts import Player from gungame51.core.leaders.shortcuts import get_leader_level from gungame51.core.players.shortcuts import setAttribute # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_handicap' info.title = 'GG Handicap' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 561 $".split('$Rev: ')[1].split()[0] info.conflicts = ['gg_teamplay', 'gg_teamwork'] info.translations = ['gg_handicap'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_handicap_update = es.ServerVar('gg_handicap_update') gg_handicap_max = es.ServerVar('gg_handicap_max') gg_handicap = es.ServerVar('gg_handicap') gg_handicap_no_reconnect = es.ServerVar('gg_handicap_no_reconnect') gg_handicap_legacy_mode = es.ServerVar('gg_handicap_legacy_mode') # Players that have joined a team this map [<joined a team?>, <reconnecting?>] handicap_players = {}
# Players from gungame51.core.players import Player # Weapons from gungame51.core.weapons.shortcuts import get_level_weapon # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_teamwork' info.title = 'GG Teamwork' info.author = 'GG Dev Team' info.version = '5.1.%s' % '$Rev: 586 $'.split('$Rev: ')[1].split()[0] info.conflicts = ['gg_deathmatch', 'gg_handicap', 'gg_teamplay'] info.translations = ['gg_teamwork'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_teamwork_jointeam_level = ServerVar('gg_teamwork_jointeam_level') gg_teamwork_round_messages = ServerVar('gg_teamwork_round_messages') gg_teamwork_leader_messages = ServerVar('gg_teamwork_leader_messages') gg_teamwork_winner_messages = ServerVar('gg_teamwork_winner_messages') # ============================================================================= # >> EVENT CLASSES # ============================================================================= class GG_Team_Win(ESEvent):
from gungame51.modules.active import ActiveInfo # Addons from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_tk_punish' info.title = 'GG TK Punish' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 627 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_tk_punish'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Get the es.ServerVar() instance of "gg_tk_punish" gg_tk_punish = es.ServerVar('gg_tk_punish') # ============================================================================= # >> GAME EVENTS # ============================================================================= def player_death(event_var): # Has the round ended? if not ActiveInfo.round:
# Players from gungame51.core.players.shortcuts import Player from gungame51.core.players.shortcuts import setAttribute # Weapons from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_hostage_stopped_levels' info.title = 'GG Hostage Stopped' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 549 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_hostage_stopped_levels'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_hostage_stopped_levels = es.ServerVar('gg_hostage_stopped_levels') gg_hostage_stopped_stops = es.ServerVar('gg_hostage_stopped_stops') gg_hostage_stopped_skip_knife = es.ServerVar('gg_hostage_stopped_skip_knife') gg_hostage_stopped_skip_nade = es.ServerVar('gg_hostage_stopped_skip_nade') # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): # Start all current players hostage stop counters
# GunGame Imports # Addons from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player from gungame51.core.players.shortcuts import setAttribute # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_hostage_objective' info.title = 'GG Hostage Objective' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 549 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_hostage_killed_punish'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_hostage_killed_punish = es.ServerVar('gg_hostage_killed_punish') gg_hostage_killed_kills = es.ServerVar('gg_hostage_killed_kills') # ============================================================================= # >> CLASSES # ============================================================================= # ============================================================================= # >> LOAD & UNLOAD # =============================================================================
from gungame51.core.players.shortcuts import Player from gungame51.core.players.shortcuts import remove_callbacks_for_addon # Weapons from gungame51.core.weapons.shortcuts import get_level_multikill from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_level_info' info.title = 'GG Level Info' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 592 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_level_info'] # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): # Register Multikill Attribute callback add_attribute_callback('multikill', multikill_call_back, info.name) def unload(): # Unregister Multikill Attribute callback remove_callbacks_for_addon(info.name)
# Weapons from gungame51.core.weapons.shortcuts import get_level_multikill from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_teamplay' info.title = 'GG Teamplay' info.author = 'GG Dev Team' info.version = '5.1.%s' % '$Rev: 586 $'.split('$Rev: ')[1].split()[0] info.conflicts = ['gg_deathmatch', 'gg_handicap', 'gg_teamwork'] info.translations = ['gg_teamplay'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_teamplay_roundend_messages = ServerVar('gg_teamplay_roundend_messages') gg_teamplay_level_info = ServerVar('gg_teamplay_level_info') gg_teamplay_winner_messages = ServerVar('gg_teamplay_winner_messages') gg_teamplay_end_on_first_kill = ServerVar('gg_teamplay_end_on_first_kill') # ============================================================================= # >> EVENT CLASSES # ============================================================================= class GG_Team_Win(ESEvent):
# Messaging from gungame51.core.messaging.shortcuts import centermsg from gungame51.core.messaging.shortcuts import saytext2 from gungame51.core.messaging.shortcuts import toptext # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = "gg_winner_messages" info.title = "GG Winner Messages" info.author = "GG Dev Team" info.version = "5.1.%s" % "$Rev: 563 $".split("$Rev: ")[1].split()[0] info.translations = ["gg_winner_messages"] # ============================================================================= # >> GAME EVENTS # ============================================================================= def gg_win(event_var): # Store the winner's name name = event_var["es_attackername"] # Store the winner's index index = int(event_var["es_attackerindex"]) # Send chat message for player winning the match saytext2("#human", index, "PlayerWon", {"player": name})
# GunGame Imports # Addons from gungame51.core.addons.shortcuts import AddonInfo # Messaging from gungame51.core.messaging.shortcuts import msg from gungame51.core.messaging.shortcuts import saytext2 # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_leader_messages' info.title = 'GG Leader Messages' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 569 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_leader_messages'] # ============================================================================= # >> GAME EVENTS # ============================================================================= def gg_new_leader(event_var): saytext2('#human', event_var['es_userindex'], 'NewLeader', {'player': event_var['es_username'], 'level': event_var['leader_level']}) def gg_tied_leader(event_var): # Get the number of current leaders leaders = len(event_var['leaders'].split(','))
from gungame51.core.messaging.shortcuts import msg from gungame51.core.messaging.shortcuts import hudhint from gungame51.core.messaging.shortcuts import langstring from gungame51.core.events import GG_Vote from gungame51.core.leaders.shortcuts import get_leader_level from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_map_vote' info.title = 'GG Map Vote' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 624 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_map_vote'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Server Vars gg_map_vote = es.ServerVar('gg_map_vote') gg_map_vote_command = es.ServerVar('gg_map_vote_command') gg_map_vote_size = es.ServerVar('gg_map_vote_size') gg_map_vote_trigger = es.ServerVar('gg_map_vote_trigger') gg_map_vote_time = es.ServerVar('gg_map_vote_time') gg_map_vote_dont_show_last_maps = es.ServerVar( 'gg_map_vote_dont_show_last_maps') gg_map_vote_show_player_vote = es.ServerVar('gg_map_vote_show_player_vote') gg_map_vote_file = es.ServerVar('gg_map_vote_file') gg_map_vote_list_source = es.ServerVar('gg_map_vote_list_source')
# GunGame Imports from gungame51.core.addons.shortcuts import AddonInfo from gungame51.core.messaging.shortcuts import langstring from gungame51.core import get_game_dir # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = "gg_spawnpoints" info.title = "GG Spawnpoints" info.author = "GG Dev Team" info.version = "5.1.%s" % "$Rev: 608 $".split('$Rev: ')[1].split()[0] info.translations = ["gg_spawnpoints"] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Used to store prop information for spawn_show propIndexes = {} # The model used for spawn_show propModel = "player/ct_gign.mdl" current_map = es.ServerVar('eventscripts_currentmap') # ============================================================================= # >> LOAD & UNLOAD
from gungame51.core.messaging.shortcuts import msg from gungame51.core.messaging.shortcuts import hudhint from gungame51.core.messaging.shortcuts import langstring from gungame51.core.events import GG_Vote from gungame51.core.leaders.shortcuts import get_leader_level from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = "gg_map_vote" info.title = "GG Map Vote" info.author = "GG Dev Team" info.version = "5.1.%s" % "$Rev: 624 $".split("$Rev: ")[1].split()[0] info.translations = ["gg_map_vote"] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Server Vars gg_map_vote = es.ServerVar("gg_map_vote") gg_map_vote_command = es.ServerVar("gg_map_vote_command") gg_map_vote_size = es.ServerVar("gg_map_vote_size") gg_map_vote_trigger = es.ServerVar("gg_map_vote_trigger") gg_map_vote_time = es.ServerVar("gg_map_vote_time") gg_map_vote_dont_show_last_maps = es.ServerVar("gg_map_vote_dont_show_last_maps") gg_map_vote_show_player_vote = es.ServerVar("gg_map_vote_show_player_vote") gg_map_vote_file = es.ServerVar("gg_map_vote_file") gg_map_vote_list_source = es.ServerVar("gg_map_vote_list_source") gg_map_vote_player_command = es.ServerVar("gg_map_vote_player_command")
from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player # Weapons from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_bomb_exploded_levels' info.title = 'GG Welcome Message' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 560 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_bomb_exploded_levels'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_bomb_exploded_levels = es.ServerVar('gg_bomb_exploded_levels') gg_bomb_exploded_skip_knife = es.ServerVar('gg_bomb_exploded_skip_knife') gg_bomb_exploded_skip_nade = es.ServerVar('gg_bomb_exploded_skip_nade') # ============================================================================= # >> GAME EVENTS # ============================================================================= def bomb_exploded(event_var): # Get the player instance ggPlayer = Player(event_var['userid'])
from gungame51.core.players.shortcuts import remove_callbacks_for_addon from gungame51.core.weapons.shortcuts import get_total_levels from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.messaging.shortcuts import msg from gungame51.core.messaging.shortcuts import saytext2 from gungame51.core.events import GG_Knife_Steal # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_knife_pro' info.title = 'GG Knife Pro' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 571 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_knife_pro'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_knife_pro_limit = es.ServerVar('gg_knife_pro_limit') gg_allow_afk_levels = es.ServerVar('gg_allow_afk_levels') gg_allow_afk_levels_knife = es.ServerVar('gg_allow_afk_levels_knife') gg_knife_pro_always_level = es.ServerVar('gg_knife_pro_always_level') gg_knife_pro_skip_nade = es.ServerVar('gg_knife_pro_skip_nade') # players level up internally before our player_death, so we added a callback # and store the userid who just got off of knife to check on in player_death recentlyOffKnife = []
# Messaging from gungame51.core.messaging.shortcuts import msg # Players from gungame51.core.players.shortcuts import Player # Weapons from gungame51.core.weapons.shortcuts import get_level_multikill # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_prop_physics' info.title = 'GG Prop Physics' info.author = 'Satoon101' info.version = "5.1.%s" % "$Rev: 549 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_prop_physics'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_prop_physics_nade = es.ServerVar('gg_prop_physics_increment_nade') gg_prop_physics_knife = es.ServerVar('gg_prop_physics_increment_knife') gg_multi_messages = set() # ============================================================================= # >> GAME EVENTS # ============================================================================= def player_death(event_var): # Was the death caused by prop_physics?
# Messaging from gungame51.core.messaging.shortcuts import msg # Players from gungame51.core.players.shortcuts import Player # Weapons from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_friendlyfire' info.title = 'GG Friendly Fire' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 625 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_friendlyfire'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Get the es.ServerVar() instance of "gg_friendlyfire" gg_friendlyfire = es.ServerVar('gg_friendlyfire') # Get the es.ServerVar() instance of "mp_friendlyfire" mp_friendlyfire = es.ServerVar('mp_friendlyfire') # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): # Store a backup of friendlyfire
# Script Imports from modules.dictionary import players # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_deathmatch' info.title = 'GG Deathmatch' info.author = 'GG Dev Team' info.version = get_version('gg_deathmatch') info.requires = ['gg_dead_strip', 'gg_dissolver'] info.conflicts = ['gg_elimination', 'gg_teamplay', 'gg_teamwork'] info.translations = ['gg_deathmatch'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # ServerVar instances mp_freezetime = es.ServerVar('mp_freezetime') mp_roundtime = es.ServerVar('mp_roundtime') # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): '''Called when DeathMatch is loaded'''
# Script Imports from modules.dictionary import players from modules.respawn import respawn_players # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_elimination' info.title = 'GG Elimination' info.author = 'GG Dev Team' info.version = get_version(info.name) info.requires = ['gg_dead_strip', 'gg_dissolver'] info.conflicts = ['gg_deathmatch'] info.translations = [info.name] # ============================================================================= # >> LOAD & UNLOAD # ============================================================================= def load(): '''Called when Elimination is loaded''' # Register the joinclass/jointeam filter es.addons.registerClientCommandFilter(join_filter) def unload(): '''Called when Elimination is unloaded'''
# Modules from gungame51.modules.active import ActiveInfo # Addons from gungame51.core.addons.shortcuts import AddonInfo # Players from gungame51.core.players.shortcuts import Player # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_tk_punish' info.title = 'GG TK Punish' info.author = 'GG Dev Team' info.version = "5.1.%s" % "$Rev: 627 $".split('$Rev: ')[1].split()[0] info.translations = ['gg_tk_punish'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= # Get the es.ServerVar() instance of "gg_tk_punish" gg_tk_punish = es.ServerVar('gg_tk_punish') # ============================================================================= # >> GAME EVENTS # ============================================================================= def player_death(event_var): # Has the round ended? if not ActiveInfo.round: return
from gungame51.core.players import Player # Weapons from gungame51.core.weapons.shortcuts import get_level_multikill from gungame51.core.weapons.shortcuts import get_level_weapon from gungame51.core.weapons.shortcuts import get_total_levels # ============================================================================= # >> ADDON REGISTRATION/INFORMATION # ============================================================================= info = AddonInfo() info.name = 'gg_teamplay' info.title = 'GG Teamplay' info.author = 'GG Dev Team' info.version = '5.1.%s' % '$Rev: 586 $'.split('$Rev: ')[1].split()[0] info.conflicts = ['gg_deathmatch', 'gg_handicap', 'gg_teamwork'] info.translations = ['gg_teamplay'] # ============================================================================= # >> GLOBAL VARIABLES # ============================================================================= gg_teamplay_roundend_messages = ServerVar('gg_teamplay_roundend_messages') gg_teamplay_level_info = ServerVar('gg_teamplay_level_info') gg_teamplay_winner_messages = ServerVar('gg_teamplay_winner_messages') gg_teamplay_end_on_first_kill = ServerVar('gg_teamplay_end_on_first_kill') # ============================================================================= # >> EVENT CLASSES # ============================================================================= class GG_Team_Win(ESEvent): '''Fires when a team wins the game'''