ItsMods

Full Version: No points on suicide
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want zombies to gain points only when they are killed by the enemy team.
I used the following codes but they didn't work.

Code:
    [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
    
    if(self.doZombie && eAttacker.team == "allies")
    {
        self.bounty += 75;
        self notify("CASH");
    }

Code:
    [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
    
    if(self.doZombie && self.sMeansOfDeath != "MOD_SUICIDE")
    {
        self.bounty += 75;
        self notify("CASH");
    }

Code:
if(self.doZombie && eAttacker != self)
    {
        self.bounty += 75;
        self notify("CASH");
    }

Code:
if(eAttacker.team == "allies")
    {
        eAttacker notify("pointkill");
        self.bounty += 75;
        self notify("CASH");
    }


I've added this to onplayerspawned(); and it's working now. However, I still want to know why don't the codes above work.
Code:
if(self.pers["suicides"] >= 1)
    {
        self.pers["suicides"] = 0;
        self.bounty -= 75;
        self notify("CASH");
    }

put it above it
Code:
if(self.doZombie && eAttacker.team == "allies")
    {
        self.bounty += 75;
        self notify("CASH");
    }

    [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
(07-18-2011, 13:59)iAegle Wrote: [ -> ]put it above it
Code:
if(self.doZombie && eAttacker.team == "allies")
    {
        self.bounty += 75;
        self notify("CASH");
    }

    [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);

Doesn't matter.
if(self.pers["change this to killed by enemy mabey"] - self.cd > 0)
{
self.bounty += 75;
self.cd++;
self notify("CASH");
(07-18-2011, 14:13)birdplane Wrote: [ -> ]if(self.pers["change this to killed by enemy mabey"] - self.cd > 0)
{
self.bounty += 75;
self.cd++;
self notify("CASH");

self.cd?
(07-18-2011, 14:09)Lemon Wrote: [ -> ]
(07-18-2011, 13:59)iAegle Wrote: [ -> ]put it above it
Code:
if(self.doZombie && eAttacker.team == "allies")
    {
        self.bounty += 75;
        self notify("CASH");
    }

    [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);

Doesn't matter.

It does, because [[level.callbackPlayerKilled]] is not threaded.

anyway, open globallogic_player.gsc and modify the Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration) function instead of what you did.
(07-18-2011, 14:16)Lemon Wrote: [ -> ]
(07-18-2011, 14:13)birdplane Wrote: [ -> ]if(self.pers["change this to killed by enemy mabey"] - self.cd > 0)
{
self.bounty += 75;
self.cd++;
self notify("CASH");

self.cd?

found self cd inside your original version of the mod
(07-18-2011, 14:22)birdplane Wrote: [ -> ]
(07-18-2011, 14:16)Lemon Wrote: [ -> ]
(07-18-2011, 14:13)birdplane Wrote: [ -> ]if(self.pers["change this to killed by enemy mabey"] - self.cd > 0)
{
self.bounty += 75;
self.cd++;
self notify("CASH");

self.cd?

found self cd inside your original version of the mod

I changed it.

@iAegle it was above that function when I tested. I'll try modifying globallogic_player.gsc now.
edit: @iAegle: Didn't worked.