gg_elimination

Discussion about Included Addons

gg_elimination

Postby wtfaatp » Wed Apr 27, 2011 3:52 pm

Is there a way you can add a script in which detects players alive, and stops the re-spawn scripts.


So say that if there are only two living people the respawn script will stop.(Until round_start)
This would allow for knife fights and the suck on elim servers.
I dont know how you would wanna do it but maybe this sscenario will help.



"Three people left alive two T one CT. (Kris, Kyle (t), and Bret).
Kyle has killed 2 other people on brets team, and kris 1.
If Bret killed either would we want the script to stop (Can you make it an opion)."

I gave myself a try at this (Not being great @ Python) and had a hard time figureing out how to grab the respawn script.
Maybe if you made the re-spawn times cvar's you could relay this to a custom script in hich someone else could make not not have to make it a build in one.



Just thought about this i might see what i can do with deathmatch since it dose have re-spawn cvar.
wtfaatp

Private
Private
 
Posts: 80
Joined: Fri Mar 04, 2011 4:21 pm
Steam Friends Name: Darkangel2022000

Postby wtfaatp » Wed Apr 27, 2011 7:52 pm

Also (I've posted this else were), when the person that kills you dies @ the same time you die. The elimination script it's self just stops working. My solution was to change the time from 1 second to 1.1 or 2.

My event containing to this matter.
def player_death(event_var):

    # Check to see if the round is active
    if not roundInfo.active:
        return

    # Get userid and attacker userids
    userid = int(event_var['userid'])
    attacker = int(event_var['attacker'])
    ggVictim = Player(userid)

    # Was suicide?
    if userid == attacker or attacker == 0:
        gamethread.delayed(10, respawnPlayer, (userid, roundInfo.round))
        ggVictim.msg('SuicideAutoRespawn', prefix=True)

    # Was a teamkill?
    elif event_var['es_userteam'] == event_var['es_attackerteam']:
        gamethread.delayed(0.1, respawnPlayer, (userid, roundInfo.round))
        ggVictim.msg('TeamKillAutoRespawn', prefix=True)

    # Was a normal death
    else:
        ggAttacker = Player(attacker)

        # Add victim to the attackers eliminated players
        ggAttacker.eliminated.append(userid)

        # Tell them they will respawn when their attacker dies
        index = ggAttacker.index

        ggVictim.saytext2(index, 'RespawnWhenAttackerDies',
        {'attacker': event_var['es_attackername']}, True)

    # Check if victim had any Eliminated players
    gamethread.delayed(1.1, respawnEliminated, (userid, roundInfo.round))
wtfaatp

Private
Private
 
Posts: 80
Joined: Fri Mar 04, 2011 4:21 pm
Steam Friends Name: Darkangel2022000



Return to Included Addons

Who is online

Users browsing this forum: No registered users and 8 guests

cron