Results 1 to 3 of 3

Thread: [SD] Enable multikill

  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts

    [SD] Enable multikill

    Heres the result: http://social.xfire.com/video/62f82e

    Changes to make to your sd file:
    in callback_startgametype:
    PHP Code:
        thread limitmultikill(); 
    This will fix an infinite issue which crashes the server in the vid

    In callback_playerdamage, in the else of if(isPlayer(eAttacker) && (self != eAttacker) && (self.pers["team"] == eAttacker.pers["team"])):
    PHP Code:
            else
            {
                
    // Make sure at least one point of damage is done
                
    if(iDamage 1)
                    
    iDamage 1;
                
    self makepassthroughbullet(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime);
                
    self finishPlayerDamage(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime);

                
    // Shellshock/Rumble
                
    self thread maps\mp\gametypes\_shellshock::shellshockOnDamage(sMeansOfDeathiDamage);
                
    self playrumble("damage_heavy");
            } 
    spawnplayer:
    PHP Code:
        waittillframeend;
        
    self notify("spawned_player");
        if(
    isdefined(self.eyemarker))
            
    self.eyemarker delete();
        
    self.eyemarker spawn("script_origin"self geteye());
        
    self.eyemarker thread deleteonevent("disconect"self);
        
    self.eyemarker thread deleteonevent("spawned_player"self);
        
    self thread linkeyemarker(self.eyemarker);

    and finally, the additional functions:
    PHP Code:
    deleteonevent(evus)
    {
        
    us waittill(ev);
        if(
    isdefined(self))
            
    self delete();
    }

    linkeyemarker(marker)
    {
        
    wait 0.05;
        if(!
    isdefined(self) || !isdefined(self.sessionstate) || self.sessionstate != "playing")
        {
            if(
    isdefined(marker))
                
    marker delete();
            return;
        }
        if(
    isdefined(marker))
        {
            
    marker.linked true;
            
    marker linkto(self"tag_eye", (0,0,0), (0,0,0));
        }
    }

    makepassthroughbullet(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime)
    {
        if(!
    isdefined(vDir) || !isdefined(vPoint) || !isdefined(eAttacker) || !isplayer(eAttacker))
            return;

        if(!
    isdefined(sMeansOfDeath) || sMeansOfDeath != "MOD_RIFLE_BULLET")
            return;
        
    trace bullettrace(vPointmaps\mp\_utility::vectorscale(vDir1000) + vPointtrueself);
        
    sHitLoc "none";
        if(
    isdefined(trace["entity"]) && isplayer(trace["entity"]))
        {
            if(
    isdefined(trace["entity"].eyemarker) && isdefined(trace["entity"].eyemarker.linked))
            {
                
    vec trace["entity"].eyemarker.origin trace["position"];
                
    amount vectordot(vecvDir);
                new = 
    trace["position"] + maps\mp\_utility::vectorscale(vDiramount);
                if(
    distancesquared(new, trace["entity"].eyemarker.origin) < 10 10)
                {
                    
    sHitLoc "head";
                    
    iDamage *= 2;
                }
            }
            
    level.multikill++;
            if(
    level.multikill 3)
                return;
            
    trace["entity"thread [[level.callbackPlayerDamage]](eInflictoreAttackerint(iDamage 0.5), iDFlagssMeansOfDeathsWeapontrace["position"], vDirsHitLocpsOffsetTime);
        }
    }

    limitmultikill()
    {
        while(
    true)
        {
            
    level.multikill 0;
            
    wait 0.05;
        }

    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (5th December 2014)

  3. #2
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Will this work on all gametype files? or just only @ sd?

  4. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by Wesleyw3zep View Post
    Will this work on all gametype files? or just only @ sd?
    Probably yes.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •