Thread Rating:
  • 4 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Deathstreaks for Blackops
#1
Credits : tommi191


Kill Monitor ~ Add this to your onPlayerSpawned()
Code:
self thread killMonitor();

killMonitor()
{
   self endon( "death" );
   self endon( "disconnect" );
   while(1)
   {
      self waittill( "killed_player" );
      self.pw = getCurrentWeapon();
      self.sw = getCurrentOffHandWeapon();
      self.deaths = 0;
   }
}

Death Monitor ~ Add this to your onPlayerSpawned()
Code:
self thread deathMonitor();

deathMonitor()
{
    self endon( "death" );
    self endon( "disconnect" );
    if(!isDefined(self.deaths)) self.deaths = 0;
    while(1)
    {
        self waittill( "death" );
        self.deaths++;
        if(self.deaths >= 4 )
        {
            self thread martyDom();
            self thread painKiller();
         self thread copyCat();
        }
    }
}

Painkiller
Code:
painKiller()
{
    self endon( "painkill_done" );
    self waittill( "player_spawned" );
    self doMaxHealth();
   self VisionSetNakedForPlayer( "berserker", 0.5 );
    for(i=10;i>0;i--)
    {
        self iPrintln( "0:"+i );
        wait 1;
    }
   self VisionSetNakedForPlayer( "default", 0.5 );
    self notify( "painkill_done" );
}
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

Martydom
Code:
martydom()
{
   self endon( "disconnect" );
   self waittill( "player_spawned" );
   iPrintlnBold( "^1Martydom is Enabled" );
   for(;;)
   {
      self.loc2 = self.location;
      self waittill( "death" );
      self.loc1 = self.location
      nade = loadfx( "maps/mp_maps/fx_mp_nuked_nuclear_explosion" );
      self thread martydomNotify();
      iPrintln( "^1Martydom at" + self.loc1 );
      wait 4;
      iPrintln( "^2Martydom at" + self.loc1 + "^5exploded" );
      playfx( nade, self.loc1 );
      radiusdamage( self.loc1, 25, 25, 15, self );
   }
}
martydomNotify()
{
if( checkRange( self.loc1, self.loc2, (1,30,0) )
      {
         dist = checkDist( self.location, self.loc2 );
         for(;;)
         {
         self iPrintInBold( "^5You are" + dist + "^5feet from a MartyDom" );
         }
      }
}
checkDist( location1, location2 )
{
   a = undefined;
   for( i=0; i<2; i++ )
   {
      answer = location1[i] - location2[i];
   }
   return answer;
}
checkRange( location1, location2, range )
{
   x = [];
   y = [];
   z = [];
   x[0] = location1[0];
   x[1] = location2[0];
   y[0] = location1[1];
   y[1] = location2[1];
   z[0] = location1[2];
   z[1] = location2[2];
   a = x[0] + y[0] + z[0];
   b = x[1] + y[1] + z[1];
   for( i=range[0]; i<range[1]; i++ )
   {
      if( a == i; ) && if( b == i )
      {
         return true;
      }
   }
return false;
}


CopyCat ~ Doesn't copy perks or anything, just weapons..
Code:
copyCat()
{
   self endon( "disconnect" );
   self endon( "killcam_over" );
   iPrintlnBold( "Press [{weapnext}] to copy class" );
   input = self waittill_any_return( "Y", "X" );
   switch( input )
   {
      case "Y";
      self takeAllWeapons();
      self giveWeapon( self.pw );
      self giveWeapon( self.sw );
      self switchToWeapon( self.pw );
      self notify( "killcam_over" );
      break;
      case "X";
      self notify( "killcam_over" );
      break;
   }
   wait 5;
   self notify( "killcam_over" );
}


As I already said this is not my mod or code, it's created by tommi191, I thought I'd post it because they are usefull for all kind of mods.


--
Reply

#2
nice (;
Reply

#3
Bu when u have got Painkiller u are in Godmode, arent u?

Code:
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

If self health is not maxhealth --> self health = max health.
Godmode.
But with painkiller u arent n Godmode. U have only more HP

EDIT: I was bored Big Grin
Reply

#4
Didn't we all hate these killstreaks?
Reply

#5
hmmmm maybe we do
--
Reply

#6
Code:
deathMonitor()
{
    self endon( "death" ); //<- should be removed
    self endon( "disconnect" );
    if(!isDefined(self.deaths)) self.deaths = 0;
    while(1)
    {
        self waittill( "death" );
        self.deaths++;
        if(self.deaths >= 4 )
        {
            self thread martyDom();
            self thread painKiller();
         self thread copyCat();
        }
    }
}

otherwise the function will end before it gets to self waittill("death"); and does nothing...
[Image: b_560_95_1.png]
Reply

#7
Code:
doMaxHealth()
{
        self endon( "death" );
        self endon( "painkill_done" );
        max = 200;
        while(1)
        {
                if(self.health<max)
                {
                        self.health = max;
                }
        }
}

Code:
while(1)
        {
                if(self.health<ma...

Code:
while(1)

Where's the 'wait x;'?
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#8
Isn't MW2 painkiller is just x3 health?

Code:
self.maxhealth = 300;
self.health = self.maxhealth;
wait 10;
if(!self.health < 100)
self.health = 100;//skips this function if more than 100 hp
self.maxhealth = 100;
[Image: 1fxsnb.jpg]
Reply

#9
(03-09-2011, 06:44)4FunPlayin Wrote: Isn't MW2 painkiller is just x3 health?

Code:
self.maxhealth = 300;
self.health = self.maxhealth;
wait 10;
if(!self.health < 100)
self.health = 100;//skips this function if more than 100 hp
self.maxhealth = 100;

No, is damage/3, Big Grin, I saw it in _perkfunctions.gsc(in MW2)
Reply

#10
Martydom got bad syntx o.O
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] Blackops Flyable Jet rotceh_dnih 8 5,304 03-08-2013, 14:06
Last Post: Erik The Born
  [Request] BlackOps/MW3 Camo for MW2 dingo95 1 3,488 09-26-2012, 03:38
Last Post: LiquidPoop
  [Request] blackops speak often dead 2 2,321 04-26-2012, 06:53
Last Post: often dead
  [Request] blackops SP offset's rotceh_dnih 2 2,627 11-27-2011, 02:52
Last Post: rotceh_dnih
  [Request] Paintball mod for blackops NoXiDe 4 4,138 10-24-2011, 14:45
Last Post: d0h!
Sad Help BlackOps Mod error Lancexable 14 8,499 10-23-2011, 13:45
Last Post: JariZ
  Preview Blackops ProRadar Compass callout's rotceh_dnih 10 6,859 06-16-2011, 21:54
Last Post: lilmack
  [Request] Blackops Proradar rotceh_dnih 23 28,327 06-10-2011, 14:43
Last Post: rotceh_dnih
  Preview blackops valkyrie sniper Mod - just for the lolz rotceh_dnih 10 6,951 06-08-2011, 20:33
Last Post: 12ab
Wink [News] BLACKOPS MOD TOOLS! Tuesday, May 31st, 2011 rotceh_dnih 37 22,004 06-01-2011, 06:32
Last Post: Koniko

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.