Results 1 to 10 of 24

Thread: COD2 MP: adding killing spree messages

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Jun 2013
    Posts
    70
    Thanks
    20
    Thanked 32 Times in 26 Posts
    you can use my scrip
    it supports last shoot kill,revenge kill and time based multikill (this way dont need resets )

    save the following code in a file call it kspree.gsc put it in your maps/mp folder

    and add this line in your Callback_PlayerKilled function in dm.gsc/ tdm.gsc (under level.mapended is a good place ):

    maps\mp\gametypes\kspree::missions(self, Attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc);

    PHP Code:
    missions(eInflictorattackeriDamagesMeansOfDeathsWeaponvDirsHitLoc)
    {
    self endon("disconnected");
    if(
    issubstr(sWeapon,"dummy")) return;
    delay 2500;
    // sound = undefined;
    text undefined;
    attacker.onspree false;



    if(!
    isdefined(attacker.spreezeit) || !isdefined(attacker.spreezeit_alt) ||!isdefined(attacker.KillsiRow))
    {
    attacker.spreezeit 0;
    attacker.spreezeit_alt 0;
    attacker.KillsiRow 0;
    }

        if(
    isPlayer(attacker))
        {
            if(
    attacker != eInflictor)
            {
            
    eInflictor.lastkiller attacker;

                
                if(
    isAlive(attacker))
                {


                
    //LastShot
                
    if(sWeapon == attacker getweaponslotweapon("primary") && attacker getweaponslotclipammo("primary") == ||sWeapon == attacker getweaponslotweapon("primaryb") && attacker getweaponslotclipammo("primaryb") == )
                {
                if(
    sMeansOfDeath != "MOD_PROJECTILE_SPLASH" && sMeansOfDeath != "MOD_MELEE" && sMeansOfDeath != "MOD_GRENADE_SPLASH")
                {
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold("LASTSHOOT");
                }
                }
                
                
    //Revenge
                
    if(isdefined(attacker.lastkiller))
                if(
    attacker.lastkiller != eInflictor)
                
    attacker.lastkiller undefined;
                else
                {
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold("REVENGE");
                
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold("REVENGE");
                
    attacker.lastkiller undefined;

                }
                
                
                
    //SpreeStop
                
    if( isdefined(eInflictor.onspree) && eInflictor.onspree && isdefined(eInflictor.spreezeit_alt))
                {
                
    eInflictor.spreezeit getTime();
                if(
    eInflictor.spreezeit_alt delay >= eInflictor.spreezeit)
                
    iprintln("^2"+attacker.name +"^3 stops "+"^2"+eInflictor.name +"^3 on Killingspree ");
                }
                
                
                
    //KillSpree
                
    attacker.KillsiRow++;
                
    attacker.spreezeit getTime();

                    switch(
    attacker.KillsiRow)
                    {
                    case 
    1:
                    
    attacker.spreezeit_alt attacker.spreezeit;
                    break;
                    case 
    2:
                    
    // sound = "doublekill";
                    
    text "DOUBLEKILL";
                    break;
                    case 
    3:
                    
    // sound = "multikill";
                    
    text "MULTIKILL";
                    break;
                    case 
    4:
                    
    // sound = "ultrakill";
                    
    text "ULTRAKILL";    
                    break;
                    case 
    5:
                    
    // sound = "monsterkill";
                    
    text "MONSTERKILL";
                    break;
                    case 
    6:
                    
    // sound = "godlike";
                    
    text "GODLIKE";
                    break;
                    
                    case 
    7:
                    
    attacker.spreezeit 0;
                    
    attacker.spreezeit_alt 0;
                    
    attacker.KillsiRow 0;                
                    break;

                    }
                    
                        if( 
    attacker.spreezeit_alt delay attacker.spreezeit && attacker.KillsiRow 1)
                        {
                        
    attacker.onspree true;
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold text );
                        
    iprintln attacker.name text );
                        
    // attacker playLocalSound( sound );
                        
    attacker.spreezeit gettime();
                        
    attacker.spreezeit_alt attacker.spreezeit;
                        
                        }
                        else if(
    attacker.spreezeit_alt delay attacker.spreezeit)
                        {
                        
    attacker.KillsiRow 1;
                        
    attacker.spreezeit_alt gettime();

                        }
                }
            }    
        }

    i only use it in dm so if something weird going on in tdm let me know

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

    michelboonstra74 (27th July 2021)

  3. #2
    Private
    Join Date
    Mar 2021
    Location
    Netherlands
    Posts
    13
    Thanks
    4
    Thanked 1 Time in 1 Post
    Quote Originally Posted by vanfreddy View Post
    you can use my scrip
    it supports last shoot kill,revenge kill and time based multikill (this way dont need resets )

    save the following code in a file call it kspree.gsc put it in your maps/mp folder

    and add this line in your Callback_PlayerKilled function in dm.gsc/ tdm.gsc (under level.mapended is a good place ):

    maps\mp\gametypes\kspree::missions(self, Attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc);

    PHP Code:
    missions(eInflictorattackeriDamagesMeansOfDeathsWeaponvDirsHitLoc)
    {
    self endon("disconnected");
    if(
    issubstr(sWeapon,"dummy")) return;
    delay 2500;
    // sound = undefined;
    text undefined;
    attacker.onspree false;



    if(!
    isdefined(attacker.spreezeit) || !isdefined(attacker.spreezeit_alt) ||!isdefined(attacker.KillsiRow))
    {
    attacker.spreezeit 0;
    attacker.spreezeit_alt 0;
    attacker.KillsiRow 0;
    }

        if(
    isPlayer(attacker))
        {
            if(
    attacker != eInflictor)
            {
            
    eInflictor.lastkiller attacker;

                
                if(
    isAlive(attacker))
                {


                
    //LastShot
                
    if(sWeapon == attacker getweaponslotweapon("primary") && attacker getweaponslotclipammo("primary") == ||sWeapon == attacker getweaponslotweapon("primaryb") && attacker getweaponslotclipammo("primaryb") == )
                {
                if(
    sMeansOfDeath != "MOD_PROJECTILE_SPLASH" && sMeansOfDeath != "MOD_MELEE" && sMeansOfDeath != "MOD_GRENADE_SPLASH")
                {
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold("LASTSHOOT");
                }
                }
                
                
    //Revenge
                
    if(isdefined(attacker.lastkiller))
                if(
    attacker.lastkiller != eInflictor)
                
    attacker.lastkiller undefined;
                else
                {
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold(" ");
                
    attacker iprintlnbold("REVENGE");
                
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold(" ");
                
    eInflictor iprintlnbold("REVENGE");
                
    attacker.lastkiller undefined;

                }
                
                
                
    //SpreeStop
                
    if( isdefined(eInflictor.onspree) && eInflictor.onspree && isdefined(eInflictor.spreezeit_alt))
                {
                
    eInflictor.spreezeit getTime();
                if(
    eInflictor.spreezeit_alt delay >= eInflictor.spreezeit)
                
    iprintln("^2"+attacker.name +"^3 stops "+"^2"+eInflictor.name +"^3 on Killingspree ");
                }
                
                
                
    //KillSpree
                
    attacker.KillsiRow++;
                
    attacker.spreezeit getTime();

                    switch(
    attacker.KillsiRow)
                    {
                    case 
    1:
                    
    attacker.spreezeit_alt attacker.spreezeit;
                    break;
                    case 
    2:
                    
    // sound = "doublekill";
                    
    text "DOUBLEKILL";
                    break;
                    case 
    3:
                    
    // sound = "multikill";
                    
    text "MULTIKILL";
                    break;
                    case 
    4:
                    
    // sound = "ultrakill";
                    
    text "ULTRAKILL";    
                    break;
                    case 
    5:
                    
    // sound = "monsterkill";
                    
    text "MONSTERKILL";
                    break;
                    case 
    6:
                    
    // sound = "godlike";
                    
    text "GODLIKE";
                    break;
                    
                    case 
    7:
                    
    attacker.spreezeit 0;
                    
    attacker.spreezeit_alt 0;
                    
    attacker.KillsiRow 0;                
                    break;

                    }
                    
                        if( 
    attacker.spreezeit_alt delay attacker.spreezeit && attacker.KillsiRow 1)
                        {
                        
    attacker.onspree true;
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold(" ");
                        
    attacker iprintlnbold text );
                        
    iprintln attacker.name text );
                        
    // attacker playLocalSound( sound );
                        
    attacker.spreezeit gettime();
                        
    attacker.spreezeit_alt attacker.spreezeit;
                        
                        }
                        else if(
    attacker.spreezeit_alt delay attacker.spreezeit)
                        {
                        
    attacker.KillsiRow 1;
                        
    attacker.spreezeit_alt gettime();

                        }
                }
            }    
        }

    i only use it in dm so if something weird going on in tdm let me know
    Thanks! I'll give it a try and let you know if it works with my config.

  4. #3
    Private
    Join Date
    Mar 2021
    Location
    Netherlands
    Posts
    13
    Thanks
    4
    Thanked 1 Time in 1 Post
    Thanks so much!, vanfreddy! Your script works like a charm, also in TDM - and even with bots. And my players love it, cheers!

Posting Permissions

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