Results 1 to 6 of 6

Thread: cod2 hunter script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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!

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

    Invictus (25th June 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
  •