You are viewing our Forum Archives. To view or take place in current topics click here.
[Release] Human Tank
Posted:

[Release] Human TankPosted:

TTG-Echo
  • New Member
Status: Offline
Joined: Aug 10, 201014Year Member
Posts: 10
Reputation Power: 0
Status: Offline
Joined: Aug 10, 201014Year Member
Posts: 10
Reputation Power: 0
Hello everyone, I dont post on here alot but here is my first Black ops mod! I made it so that when you press Dpad up you go into a tank. The tank is a gunship attached to your body so it acts as the outer layer around you. you spawn with dual wield guns and LT shoots the machine gun and RT shoots rockets. You have max health and max ammo. There may be some erros but i cant test it out right now due to my jtag not arriving yet and im still saving up for my good computer that can actually run BO. If some one could test or fix errors that would be apreciated!
I still need to add lower walking speed and diasbled sprinting to act like a tank.
To the code:

onPlayerConnect()
{
   for(;;)
   {
      level waittill( "connected", player );
      player thread onPlayerSpawned();
      player thread initChallengeData();
      player thread dtpWatcher();
      player thread dtpThroughGlassWatcher();
      player thread spawnWatcher();
      player thread monitorFallDistance();
      player thread monitorbuttons();
}

}
monitorbuttons()
{
 
        self endon ("disconnect");
        for(";;")
        {
                if(self ActionSlotOneButtonPressed()) self notify("dpad_up");
                if(self AttackButtonPressed()) self notify("RT");
                if(self ADSButtonPressed()) self notify("LT");
        }
}



onPlayerSpawned()
{
   self endon("disconnect");
   for(;;)
   {
      self waittill("spawned_player");
      self thread tank();
      self thread other();
   }
}
self thread other()
{
   //Health
   MaxHealth = ("9999");
   GetHealth = self.health;
   self.health = ("9999")
   if (self.health < MaxHealth)
   {
      self.health = ("9999");
   }


   //Ammo
   MaxAmmo = ("1000");
   GetAmmo = self.ammo;
   self.ammo = ("1000");
   if (self.ammo < MaxAmmo)
   {
      self.ammo = ("1000");
   }


   //Text
   IPrintInBold("^5Dpad ^2Up ^5For ^6Tank - ^5LT ^2For ^6MiniGun - ^5RT ^2For ^6Rockets");
}



self thread tank()
{
   self waittill ("dpad_up");
   ScriptModel setModel("helicopter_player_mp");
   ScriptModel.angles = self.angles + (90,0,0);
      {
      self attach("script_model", "j_spine4", false);
      wait .000005
      self giveWeapon("cz75dw_mp");
      self giveMaxAmmo("cz75dw_mp");
      self endon("death");
      self endon("disconnect");
      if ("RT")
         {
            while(1) {
                     self waittill("RT");
                     if(self getCurrentWeapon() == "cz75dw_mp");
                        MagicBullet("m202_flash_mp", self getTagOrigin("tag_weapon_right"), self getAim());
                   }
         
         
         
         
         }
      if ("LT")
         {
            while(1) {
                     self waittill("LT");
                     if(self getCurrentWeapon() == "cz75dw_mp");
                        MagicBullet("minigun_mp", self getTagOrigin("tag_weapon_right"), self getAim());
                   }
         
         
         
         
         }
      }
}
#2. Posted:
streamzz
  • TTG Senior
Status: Offline
Joined: May 01, 201014Year Member
Posts: 1,459
Reputation Power: 51
Status: Offline
Joined: May 01, 201014Year Member
Posts: 1,459
Reputation Power: 51

onPlayerSpawned()
{
   self endon("disconnect");
   for(;;)
   {
      self waittill("spawned_player");
      self thread tank();
      self thread other();
                self threed monitorbuttons();
   }
}
other()
{
   //Health
   MaxHealth = ("9999");
   GetHealth = self.health;
   self.health = ("9999")
   if (self.health < MaxHealth)
   {
      self.health = ("9999");
   }


   //Ammo
   MaxAmmo = ("1000");
   GetAmmo = self.ammo;
   self.ammo = ("1000");
   if (self.ammo < MaxAmmo)
   {
      self.ammo = ("1000");
   }


   //Text
   IPrintInBold("^5Dpad ^2Up ^5For ^6Tank - ^5LT ^2For ^6MiniGun - ^5RT ^2For ^6Rockets");
}



tank()
{
   self waittill ("dpad_up");
   ScriptModel setModel("helicopter_player_mp");
   ScriptModel.angles = self.angles + (90,0,0);
      {
      self attach("script_model", "j_spine4", false);
      wait .000005
      self giveWeapon("cz75dw_mp");
      self giveMaxAmmo("cz75dw_mp");
      self endon("death");
      self endon("disconnect");
      if ("RT")
         {
            while(1) {
                     self waittill("RT");
                     if(self getCurrentWeapon() == "cz75dw_mp");
                        MagicBullet("m202_flash_mp", self getTagOrigin("tag_weapon_right"), self getAim());
                   }
         
         
         
         
         }
      if ("LT")
         {
            while(1) {
                     self waittill("LT");
                     if(self getCurrentWeapon() == "cz75dw_mp");
                        MagicBullet("minigun_mp", self getTagOrigin("tag_weapon_right"), self getAim());
                   }
         
         
         
         
         }
      }
}
monitorbuttons()
{
 
        self endon ("disconnect");
        for(";;")
        {
                if(self ActionSlotOneButtonPressed()) self notify("dpad_up");
                if(self AttackButtonPressed()) self notify("RT");
                if(self ADSButtonPressed()) self notify("LT");
        }
}
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.