Results 1 to 6 of 6

Thread: cod2 hunter script

  1. #1
    Private
    Join Date
    Jan 2014
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cod2 hunter script

    hello.

    does anybody know a script that when you kill 2 hunter as zombie that you become hunter?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Cant you write such a script yourself? It is quite trivial...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Private
    Join Date
    Jan 2014
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    add my xf please. wizzardjanni

  4. #4
    Private First Class
    Join Date
    Jul 2013
    Posts
    170
    Thanks
    44
    Thanked 16 Times in 11 Posts
    Somewhere at playerkilled..

    Code:
    Attacker thread CheckValue();
    Put this somewhere in gametype.

    Code:
    checkValue()
    {
    	level endon("endmap");
    	if(self.killed >= 2)
    	{
    		self iprintlnbold("You killed enoguh Hunters!");
    		self.killed = 0;
    		self thread moveAttacker();
    	}
    }
    Here is code for checkValue.

    And moveAttacker
    Code:
    moveAttacker()
    {
    	level endon("endmap");
    	newTeam = "axis";
    
    	if(self.pers["team"] == "axis")
    		newTeam = "allies";
    	
    	if(isAlive(self))
    	{
    		self unlink();
    		wait 0.05;
    		self suicide();
    		wait 0.05;
    	}
    
    	self notify("end_respawn");
    
    	self.pers["team"] = newTeam;
    	self.pers["weapon"] = undefined;
    	self.pers["weapon1"] = undefined;
    	self.pers["weapon2"] = undefined;
    	self.pers["spawnweapon"] = undefined;
    	self.pers["savedmodel"] = undefined;
    	self.pers["secondary_weapon"] = undefined;
    	self.maxhealth = 100;
    	self.health = self.maxhealth;
    
    	self setClientCvar("ui_allow_weaponchange", "1");
    
    	if(newTeam == "allies")
    	{
    		self openMenu(game["menu_weapon_allies"]);
    		scriptMainMenu = game["menu_weapon_allies"];
    	}
    	self waittill("joined_team");
    	iprintln(self.name + " Killed Enough Hunters!");
    }
    And i forgot.. at playerconnect() put this: self.killed = 0;


    Here is all what u need!

  5. The Following User Says Thank You to Rocky For This Useful Post:

    Invictus (25th June 2014)

  6. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Shouldnt you also reset the .killed var when you restart round...

    Edit: i also dont see where you increment the .killed var...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by wizzardjanni View Post
    hello.

    does anybody know a script that when you kill 2 hunter as zombie that you become hunter?
    In the default zombie mod you have got a cvar for it. But it requires scr_zom_lastManStanding to be 0.

    PHP Code:
    scr_zom_returnkills     The number of kills needed to return to being an Allied player - default: 
    http://callofduty.filefront.com/file...for_CoD2;53241

    PHP Code:
    //LAST MAN STANDING
    if(getcvar("scr_zom_lastManStanding") == "1")
    {
        
    //attacker.score++;
        
    if (!(thread checkRestart(self)))
        {
            
    self thread blackScreen("killed");
        }

    }    
    else
    {
        
    self thread blackScreen("killed");
        
        
    attacker.killcount++;

        if (
    attacker.killcount GetCvarInt("scr_zom_returnkills")-1)
        {
            
    attacker thread blackScreen("return");
            
    attacker thread movePlayer("allies",3);
            
    wait 0.01;
            
    thread checkRestart();

            
    noRespawn true;
        }

    Last edited by Mitch; 6th April 2014 at 22:57.

  8. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    Invictus (25th June 2014),RobsoN (6th April 2014)

Posting Permissions

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