LOADING MODZ
THIS IS VARY ANNOYING I KNOW SO JOIN OR LOG IN, IT TAKES LIKE 2 SECONDS <3 Shadow Ghost and Loading

Raining Terror

Go down

Raining Terror

Post by 3LIT3 Loading on Mon Oct 31, 2011 12:22 am

Code:
 

#include common_scripts\utility;
#include maps\custom\_utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

//Raining Terror V1

main()

{
  thread init();
}

init()
{
  thread onPlayerConnect();
  thread onPlayerConnected();

  thread Boundaries();
  thread nextRound();
  thread rounds();
}

onPlayerConnect()
{
  for(;;)
  {
      level waittill( "connecting", player );

      player thread playerTeams();
  }
}

onPlayerConnected()
{
  for(;;)
  {
      level waittill( "connected", player );

      player thread onPlayerSpawned();
      player thread setupTeam();
      player thread Respawn();
      player thread lifeHUD();
      player thread Class();
      player thread Teleporter();
      player thread TeleporterYellow();
  }
}

onPlayerSpawned()
{
  for(;;)
  {
      self waittill( "spawned_player" );

      self thread EndGame();
      self thread PlayerOptions();
  }
}

rounds()
{
  level.round = 1;

  level.rnd = createServerFontString( "objective", 4.3 );
  level.rnd setPoint( "TOPLEFT", "TOPLEFT", 10, 220 );
  level.rnd setText( "\n^1" + level.round );
  level.rnd.foreground = true;
  level.rnd.hidewheninmenu = true;

  for(;;)
  {
      level waittill( "round_up" );

      level.round += 1;
      level.rnd setText( "\n^1" + level.round );
  }
}

nextRound()
{
  level endon( "game_wasover" );

  rndTimer = createServerFontString( "objective", 1.5 );
  rndTimer setPoint( "CENTER", "TOP", 0, 10 );

  for(i=60;i>0;i--)
  {
      rndTimer setText( "Next round in: ^5"+ i );
      wait 1.0;
  }
  rndTimer destroy();

  level notify( "round_up" );
  level thread RoundTele();
  level thread nextRound();
}

RoundTele()
{
  self endon( "disconnect" );
  level endon("game_wasover");

  for(i=0;i<get_players().size;i++)
  {
          get_players()[i] setOrigin( ( -1599.97, 1120.38, -12.9762 ) );
        }
}

Respawn()
{
  self endon( "disconnect" );

  for(;;)
  {
      self waittill( "death" );

      self.playerStatus = "dead";
      self notify( "menuresponse", game["menu_team"], "spectator" );

      level waittill( "round_up" );

      self.playerStatus = "alive";
      self notify( "menuresponse", game["menu_team"], "axis" );
  }
}

setupTeam()
{
  if( self.team == ( "allies" || "spectator" || "none" || undefined ) )
  {
      wait 0.2;
      self notify( "menuresponse", game["menu_team"], "axis" );
  }
  self.playerStatus = "alive";
}

playerTeams()
{
  level endon( "game_wasover" );

  for(;;)
  {
      wait 1.0;
      if( self.playerStatus == "alive" && self.team == "axis" )
      {
        self.playerStatus = "alive";
      }
      else if( self.playerStatus == "alive" && self.team == ( "allies" || "spectator" || "none" || undefined ) )
      {
        self.playerStatus = "alive";
        self notify( "menuresponse", game["menu_team"], "axis" );
      }
      else if( self.playerStatus == "dead" && self.team == ( "axis" || "allies" || "none" || undefined ) )
      {
        self.playerStatus = "dead";
        self notify( "menuresponse", game["menu_team"], "spectator" );
      }
  }
}

EndGame()
{
  for(;;)
  {
      wait 1.0;
      if( level.playerCount["axis"] == 0 )
      {
        level notify( "game_wasover" );
        for(i=0;i<level.players.size;i++)
        {
            level.players[i] notify( "menuresponse", game["menu_team"], "axis" );
        }
        wait 0.5;
        thread maps\mp\gametypes\_globallogic::endGame( "axis", "You survived ^1"+level.round+"^7 rounds!" );
        break;
      }
  }
}

PlayerOptions()
{
  self endon ( "disconnect" );
  if( self.pers["team"] == "axis" )
  {
      self.maxHealth = 500;
      self.health = self.maxHealth;

          self iPrintlnBold( "^5The game lags when someone dies." );
      iPrintln(  "^7" + self.name + " ^7Spawned" );
          thread maps\mp\_popups::DisplayTeamMessageToAll( "^1LOOK IT'S RAINING!", self );

      self takeAllWeapons();
      self giveWeapon("dog_bite_mp");
                self setPerk("specialty_movefaster");
      self setPerk("specialty_unlimitedsprint");
      wait 0.01;
      self thread Rain();
      self thread NoCamp();
  }
}

Rain()
{
  for(;;)
  {
      orig = self.origin;
      wait 1;
      MagicBullet( "china_lake_mp", orig +(0, 0, 6000), orig, self );
  }
}

NoCamp()
{
  self endon("death");
  self endon("disconnect");

  self.positions = [];

  for(i=0;;i++)
  {
      self.positions[i] = self.origin;
      wait 6;
      for(k = 0; k < self.positions.size; k++)
      {
        while(distance(self.positions[k], self.origin) < 100)
        {
            self iPrintLnBold("^1STOP CAMPING");
            self [[level.callbackPlayerDamage]]( undefined, self, 30, 8, "MOD_SUICIDE", "mortar_mp", self.positions[k], self.positions[k], "none", 0 );
            wait 1.5;
        }
      }
      if(i > 5)
      {
        i = 0;
      }
  }
}

Class()
{
  self setClientDvar( "customclass1", "^7 You Are Playing ^1Raining Terror^7." );
  self setClientDvar( "customclass2", "^7 Made By ^2HAXZing TERR0RIST^7.");
  self setClientDvar( "customclass3", "^3 Try To Survive As Long As You Can." );
  self setClientDvar( "customclass4", "^5 You Can Run But You Can't Hide!");
  self setClientDvar( "customclass5", "^2 The Game Lags When Someone Dies.");
}

Boundaries()
{
  switch( getDvar( "mapname" ) )
  {
      case "mp_nuked": // This is Nuketown Boundaries
        level.bunkers[1] = createBound( ( -867.5, 835.993, -48.0697 ), ( 0, 159.398, 0 ) ); //Blue House
        level.bunkers[2] = createBound( ( -847.861, 895.859, -47.2277 ), ( 0, 159.2, 0 ) );
        level.bunkers[3] = createBound( ( -867.684, 832.065, -19.3063 ), ( 0, 159.354, 0 ) );
        level.bunkers[4] = createBound( ( -843.262, 897.703, -17.9367 ), ( 0, 159.788, 0 ) );
        level.bunkers[5] = createBound( ( -843.683, 898.694, 13.7881 ), ( 0, 158.508, 0 ) );
        level.bunkers[6] = createBound( ( -867.966, 835.309, 12.9222 ), ( 0, 157.277, 0 ) );
        level.bunkers[7] = createBound( ( -973.95, 697.788, -49.9872 ), ( 0, 159.403, 0 ) );
        level.bunkers[8] = createBound( ( -975.399, 699.274, -21.1723 ), ( 0, 159.738, 0 ) );
        level.bunkers[9] = createBound( ( -976.456, 701.068, 9.85573 ), ( 0, 160.749, 0 ) );
        level.bunkers[10] = createBound( ( -990.873, 382.769, -45.8848 ), ( 0, 250.854, 0 ) );
        level.bunkers[11] = createBound( ( -992.44, 383.74, -13.8786 ), ( 0, 252.029, 0 ) );
        level.bunkers[12] = createBound( ( -993.15, 383.536, 17.3565 ), ( 0, 252.359, 0 ) );
        level.bunkers[13] = createBound( ( -1010.32, 608.585, 95.3791 ), ( 0, 159.409, 0 ) );
        level.bunkers[14] = createBound( ( -1007.47, 608.766, 126.749 ), ( 0, 158.98, 0 ) );
        level.bunkers[15] = createBound( ( -1004.57, 609.992, 155.641 ), ( 0, 159.107, 0 ) );
        level.bunkers[16] = createBound( ( -1001.53, 127.164, -42.0428 ), ( 0, 160.553, 0 ) );
        level.bunkers[17] = createBound( ( -1000.81, 126.325, -10.1742 ), ( 0, 160.465, 0 ) );
        level.bunkers[18] = createBound( ( -999.701, 125.612, 20.5206 ), ( 0, 160.652, 0 ) );
        level.bunkers[19] = createBound( ( -1025.77, -9.03902, -46.9687 ), ( 0, 157.109, 0 ) );
        level.bunkers[20] = createBound( ( -1050.78, -70.7212, -46.4778 ), ( 0, 158.323, 0 ) );
        level.bunkers[21] = createBound( ( -1075.61, -126.73, -45.5248 ), ( 0, 159.075, 0 ) );
        level.bunkers[22] = createBound( ( -1039.26, -8.85094, -12.1459 ), ( 0, 156.245, 0 ) );
        level.bunkers[23] = createBound( ( -1062.43, -64.2599, -10.3733 ), ( 0, 163.628, 0 ) );
        level.bunkers[24] = createBound( ( -1084.96, -125.163, -9.11644 ), ( 0, 155.762, 0 ) );
        level.bunkers[25] = createBound( ( 596.12, -89.0752, -49.3468 ), ( 0, 12.7716, 0 ) ); //Yellow House
        level.bunkers[26] = createBound( ( 596.421, -89.5984, -19.6687 ), ( 0, 13.4363, 0 ) );
        level.bunkers[27] = createBound( ( 598.062, -92.9346, 8.92696 ), ( 0, 14.6564, 0 ) );
        level.bunkers[28] = createBound( ( 601.85, -15.2, 4.42773 ), ( 0, 194.244, 0 ) );
        level.bunkers[29] = createBound( ( 1135.18, 299.728, 101.278 ), ( 0, 15.0623, 0 ) );
        level.bunkers[30] = createBound( ( 1130.31, 300.032, 153.433 ), ( 0, 15.3585, 0 ) );
        level.bunkers[31] = createBound( ( 1146.99, 263.385, -36.0399 ), ( 0, 15.0838, 0 ) );
        level.bunkers[32] = createBound( ( 1146.91, 262.922, 8.83355 ), ( 0, 14.3038, 0 ) );
        level.bunkers[33] = createBound( ( 992.493, 686.073, -38.7014 ), ( 0, 14.0786, 0 ) );
        level.bunkers[34] = createBound( ( 990.022, 683.038, 2.61758 ), ( 0, 15.374, 0 ) );
        level.bunkers[35] = createBound( ( 704.899, 825.091, -39.3801 ), ( 0, 14.8336, 0 ) );
        level.bunkers[36] = createBound( ( 688.207, 890.828, -38.8622 ), ( 0, 13.4475, 0 ) );
        level.bunkers[37] = createBound( ( 702.48, 822.326, -9.06427 ), ( 0, 14.9911, 0 ) );
        level.bunkers[38] = createBound( ( 688.941, 888.856, -9.56589 ), ( 0, 14.1945, 0 ) );
        level.bunkers[39] = createBound( ( 770.084, 946.516, -22.1371 ), ( 0, 284.442, 0 ) );
        level.bunkers[40] = createGreen( ( -1114.03, 445.671, 97.3139 ), ( 0, 69.0662, 0 ) ); //Teleporter Model Blue
        level.bunkers[41] = createSpot( ( -1114.03, 445.671, 97.3139 ) ); //Teleport Spot Blue
        level.bunkers[42] = createGreen( ( 1124.8, 478.653, 95.0632 ), ( 0, 284.815, 0 ) ); //Teleporter Model Yellow
        level.bunkers[43] = createSpotYellow( ( 1124.8, 478.653, 95.0632 ) ); //Teleport Spot Yellow
        break;
  }
}

createBound( pos, angle ) //Boundaries
{
  crateB = spawn( "script_model", pos );
  crateB setModel( "mp_supplydrop_boobytrapped" );
  crateB.angles = angle;
}

createGreen( pos, angle ) // Teleporter Model
{
  level.crateG = spawn( "script_model", pos );
  level.crateG setModel( "mp_supplydrop_ally" );
  level.crateG.angles = angle;

  iconOrg = level.crateG.origin;
  icon = newTeamHudElem( "axis" );

  icon.x = iconOrg[0];

  icon.y = iconOrg[1];

  icon.z = iconOrg[2] + 30;

  icon.alpha = .59;

  icon.archived = true;

  icon setShader( "compass_supply_drop_green", 15, 15 );
  icon setwaypoint( true );
}

createSpot( pos ) // Teleport Spot
{
  level.teleSpot = spawn( "script_model", pos );
}

createSpotYellow( pos ) // Teleport Spot
{
  level.teleSpotYellow = spawn( "script_model", pos );
}

Teleporter()
{
  self endon( "disconnect" );
  level endon("game_wasover");

  level.teleInProg = 0;

  for(;;)
  {
      if( distance( self.origin, level.teleSpot.origin ) < 100 && level.teleInProg == 0 )
      {
        self setLowerMessage( "Press [{+activate}] to use the teleporter" );
        while( distance( self.origin, level.teleSpot.origin ) < 100 )
        {
            if( self useButtonPressed() == true )
            {
              thread TeleportTo();
              break;
            }
            wait 0.05;
        }
      }
      else
      {
        self clearLowerMessage( 3 );
      }
      wait 0.05;
  }
}

TeleportTo()
{
  level.teleInProg = 1;

  for(i=0;i<level.players.size;i++)
  {
      if( distance( level.players[i].origin, level.teleSpot.origin ) < 100 )
        level.players[i] setOrigin( ( 700.982, -153.357, -8.76514 ) );
      wait 0.3;
  }

  level.teleInProg = 0;
}

TeleporterYellow()
{
  self endon( "disconnect" );
  level endon("game_wasover");

  level.teleInProg = 0;

  for(;;)
  {
      if( distance( self.origin, level.teleSpotYellow.origin ) < 100 && level.teleInProg == 0 )
      {
        self setLowerMessage( "Press [{+activate}] to use the teleporter" );
        while( distance( self.origin, level.teleSpotYellow.origin ) < 100 )
        {
            if( self useButtonPressed() == true )
            {
              thread TeleportYellowTo();
              break;
            }
            wait 0.05;
        }
      }
      else
      {
        self clearLowerMessage( 3 );
      }
      wait 0.05;
  }
}

TeleportYellowTo()
{
  level.teleInProg = 1;

  for(i=0;i<level.players.size;i++)
  {
      if( distance( level.players[i].origin, level.teleSpotYellow.origin ) < 100 )
        level.players[i] setOrigin( ( -1599.97, 1120.38, -12.9762 ) );
      wait 0.3;
  }

  level.teleInProg = 0;
}

lifeHUD()
{   
    HPD = self createFontString( "objective", 2 );
    HPD setPoint( "CENTRE", "CENTRE", 0, 170 );

    for(;;)
    {
        HPD setText( "^1Health^7:  " +self.health );
        wait 0.05;
    }
}

3LIT3 Loading
Admin
Admin

Posts : 105
Join date : 2011-10-25
Age : 21
Location : NuKeToWn NuKe

View user profile http://www.loadingmods.tk

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum