Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. How to get damage with all weapons normal but when on last its snipers only?

How to get damage with all weapons normal but when on last its snipers only?

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
1 Posts 1 Posters 118 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Scriptoundefined Offline
    Scriptoundefined Offline
    Scripto
    wrote on last edited by
    #1

    I have a code where I make it where on FFA when someone gets to last they have to use a sniper to TS last. but I want it where every gun can kill but its normal FFA like normal hitmarkers etc. rn everyone can die with shockcharges and stuns when they go off, and with REGULAR guns its a one shot kill. anyone able to help me please? ```
    Callback_PlayerDamageHook( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex) {

    self endon( "disconnect" );
    
    OnGround = eattacker IsOnGround();
    OnLast = (level.scorelimit - eattacker.pers["kills"]) == 1;
    
    if (isDefined(eattacker.pers["isBot"]) && eattacker.pers["isBot"])
    {
        return;
    }
    
    if( smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_SUICIDE" ) {
        if( smeansofdeath == "MOD_MELEE" )
            idamage = 100;
        else if( einflictor != eattacker && sweapon == "hatchet_mp" && !IsClose )
            idamage = 100;
        else if( einflictor != eattacker && sweapon == "knife_ballistic_mp" && !IsClose )
            idamage = 100;
        else if( OnLast && OnGround )
            idamage = 0;
        else if( IsSubStr( sweapon, "svu" ) && OnLast )
            idamage = 100;
        else if( IsSubStr( sweapon, "xpr" ) && OnLast )
            idamage = 100;
        else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" )
            idamage = 100;
        else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" )
            idamage = 100;
        else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" )
            idamage = 100;
        else if(OnLast && IsSubStr( sweapon, "sa58" ) )
            idamage = 100;
        else if(OnLast && IsSubStr( sweapon, "saritch" ) )
            idamage = 100;
        else if (sweapon == "knife_mp")
            idamage = 100;
        else if (sweapon == "frag_grenade" || sweapon == "concussion_grenade_mp" || sweapon == "sticky_grenade_mp" || sweapon == "willy_pete_mp")
            idamage = 100;
        else if (smeansofdeath == "MOD_EXPLOSIVE")
            idamage = 100;
        else
            idamage = 100;
        
    }
    
    if( smeansofdeath != "MOD_TRIGGER_HURT" || smeansofdeath == "MOD_SUICIDE" || smeansofdeath == "MOD_FALLING" || eattacker.classname == "trigger_hurt" ) {
        self.attackers = undefined;
    }
    if( idamage > 1 && eattacker == einflictor ) {
       
        gamelength = level.timelimit * 60;
        if ( !level.timelimit || level.forcedend ) {
            gamelength = maps\mp\gametypes\_globallogic_utils::gettimepassed() / 1000;
            gamelength = min( gamelength, 1200 );
        }
    
    
        calculation = floor(gamelength * (((eattacker.pers["rank"] + 1) + 6) / 12));
        eattacker.matchbonus = RandomIntRange(2500, 3050);
    }
    
    [[level.playerDamageStub]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex );
    

    }

    onPlayerKilled(einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shitloc, psoffsettime, deathanimduration)
    {
    OnLast = (level.scorelimit - attacker.pers["kills"]) == 1;

    thread [[level.onkillscore]](einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shitloc, psoffsettime, deathanimduration);
    if(OnLast && smeansofdeath != "MOD_SUICIDE" && smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_CRUSH" && smeansofdeath != "MOD_EXPLOSIVE")
    {
    }
    

    }

    1 Reply Last reply
    0

    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Donate