Example #1
0
def unload():
    spe.unregisterPreHook('player_hurt', pre_player_hurt)
    spe.unregisterPreHook('weapon_fire', pre_weapon_fire)
    spe.undetourFunction("PlayerRunCommand", spe.HookType.Pre, RunCmd)
    cmdlib.unregisterServerCommand('r_weaponswap')
    repeat.delete('timerz')
    es.addons.unregisterClientCommandFilter(Commander4)
Example #2
0
def player_activate_f(userid):
    steamid = getplayerid(userid)
    if steamid != "BOT":
        first_join.append(userid)
        check = est.fileexists(
            "addons/eventscripts/the_killers/player_data/es_%s_db.txt" %
            (steamid))
        if not check:
            make_player(steamid)
        else:
            if not es.exists("keygroup", steamid):
                es.keygroupload(steamid, "|the_killers/player_data")
        if int(sv('hostport')) != 27100:
            if repeat.find("music_loop"):
                repeat.delete("music_loop")
            music = "zeisenproject/the-killers/musics/RollerMobster.mp3"
            es.set("music", music)
            music_loop = repeat.create('music_loop', es.playsound,
                                       (userid, music, 1.0))
            if "RollerMobster.mp3" in music:
                music_loop.start((180 + 34), 0)
            es.playsound(userid, music, 1.0)
        if eventscripts_currentmap == "cs_office":
            es.playsound(userid, "zeisenproject/the-killers/musics/beams.mp3",
                         1.0)
Example #3
0
def unload():
    spe.unregisterPreHook('player_hurt', pre_player_hurt)
    spe.unregisterPreHook('weapon_fire', pre_weapon_fire)
    spe.undetourFunction("PlayerRunCommand", spe.HookType.Pre, RunCmd)
    cmdlib.unregisterServerCommand('r_weaponswap')
    repeat.delete('timerz')
    es.addons.unregisterClientCommandFilter(Commander4)
Example #4
0
    def removeObject(self, userid):
        """
        Remove an object from the classes container. This will call the
        deconstructor ont he HealObject instance so there is no need to manually
        clean up the repeat instance.

        @PARAM userid - the id of the user
        """
        if self.__contains__(userid):
            name = self.objects[int(userid)].name
            repeat.stop(name)
            repeat.delete(name)
            del self.objects[int(userid)]
Example #5
0
    def removeObject(self, userid):
        """
        Remove an object from the classes container. This will call the
        deconstructor ont he HealObject instance so there is no need to manually
        clean up the repeat instance.

        @PARAM userid - the id of the user
        """
        if self.__contains__(userid):
            name = self.objects[int(userid)].name
            repeat.stop(name)
            repeat.delete(name)
            del self.objects[int(userid)]
Example #6
0
def player_disconnect_f(userid, name, networkid, reason):
    steamid = getplayerid(networkid, 1)
    if steamid != "BOT":
        server_state = str(sv('server_state'))
        server_count = int(sv('server_count')) - 1
        es.set("server_count", server_count)
        server_count_refresh()
        if int(sv('hostport')) != 27100:
            if repeat.find("music_loop"):
                repeat.delete("music_loop")
        if server_count == 0 and server_state == "wait":
            server_idle()
        if es.exists("keygroup", steamid):
            es.keygroupsave(steamid, "|the_killers/player_data")
            es.keygroupdelete(steamid)
Example #7
0
def player_disconnect_f(userid, name, networkid, reason):
    steamid = getplayerid(networkid, 1)
    if steamid != "BOT":
        server_state = str(sv('server_state'))
        server_count = int(sv('server_count')) - 1
        es.set("server_count", server_count)
        server_count_refresh()
        if int(sv('hostport')) != 27100:
            if repeat.find("music_loop"):
                repeat.delete("music_loop")
        if server_count == 0 and server_state == "wait":
            server_idle()
        if es.exists("keygroup", steamid):
            es.keygroupsave(steamid, "|the_killers/player_data")
            es.keygroupdelete(steamid)
Example #8
0
def player_activate_f(userid):
    steamid = getplayerid(userid)
    if steamid != "BOT":
        first_join.append(userid)
        check = est.fileexists("addons/eventscripts/the_killers/player_data/es_%s_db.txt" %(steamid))
        if not check:
            make_player(steamid)
        else:
            if not es.exists("keygroup", steamid):
                es.keygroupload(steamid, "|the_killers/player_data")
        if int(sv('hostport')) != 27100:
            if repeat.find("music_loop"):
                repeat.delete("music_loop")
            music = "zeisenproject/the-killers/musics/RollerMobster.mp3"
            es.set("music", music)
            music_loop = repeat.create('music_loop', es.playsound, (userid, music, 1.0))
            if "RollerMobster.mp3" in music:
                music_loop.start((180 + 34), 0)
            es.playsound(userid, music, 1.0)
        if eventscripts_currentmap == "cs_office":
            es.playsound(userid, "zeisenproject/the-killers/musics/beams.mp3", 1.0)
Example #9
0
def cleanVote():
    # Clear options
    mapVoteOptions.clear()

    # Clear voters
    votedUserids.clear()

    # Delete popup ?
    if popuplib.exists("gg_map_vote"):
        popuplib.delete("gg_map_vote")

    # Delete repeat ?
    if repeat.find("gg_map_vote"):
        repeat.delete("gg_map_vote")

    # Clear userid lists
    del voteSentUserids[:]
    del voteCmdUserids[:]
    del voteUserids[:]

    global ggVote
    ggVote = None
Example #10
0
def cleanVote():
    # Clear options
    mapVoteOptions.clear()

    # Clear voters
    votedUserids.clear()

    # Delete popup ?
    if popuplib.exists('gg_map_vote'):
        popuplib.delete('gg_map_vote')

    # Delete repeat ?
    if repeat.find('gg_map_vote'):
        repeat.delete('gg_map_vote')

    # Clear userid lists
    del voteSentUserids[:]
    del voteCmdUserids[:]
    del voteUserids[:]

    global ggVote
    ggVote = None
def unload():
    repeat.delete('serverUpdate')
Example #12
0
def unload():
    # Delete the repeat loop
    if repeat.status('gungameHandicapLoop'):
        repeat.delete('gungameHandicapLoop')
Example #13
0
def unload():
    es.log("[DeToCs] Unload")
    if int(check_repeatR) == 1:
        repeat.stop("CheckCheat")
        repeat.delete("CheckCheat")
Example #14
0
def unload():
	es.log("[DeToCs] Unload")
	if int(check_repeatR) == 1:
		repeat.stop("CheckCheat")
		repeat.delete("CheckCheat")