Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Random Killstreak Box
#1
Hello

This is a easy code, is not very usefull, is only usefull for people who want to make this in a zombie mod, Nyan Cat



Code:
StreakBox(pos, angle)
{
              box = spawn("script_model", pos);
              box setModel("com_plasticcase_beige_big");
    box.angles = angle;
    box Solid();
    box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
              level.trigger = spawn( "trigger_radius", pos, 0, 50, 50 );
              level.trigger.angles = angle;
    level.trigger thread StreakBoxGive(pos, angle,box);
              wait 0.01;
}

StreakBoxGive(pos,angle,box)
{
        self endon("disconnect");

        while(1)
        {
                        self waittill( "trigger", player );      
                        if(Distance(pos, Player.origin) <= 50){
                        Player setLowerMessage("activate", "Hold ^3[{+activate}]^7 for a Random Killstreak" );}
                        if(Distance(pos, Player.origin) >50){
                        Player ClearLowerMessage("activate", 1);}
                        if(Distance(pos, Player.origin) <= 75 && player useButtonPressed())
                        {
                              player ClearLowerMessage("activate", 1);
                              player playsound( "vending_machine_button_press" );
                              box thread Effects(box);
                              player thread Bar();
                              wait 4.5;
                              player playsound( "vending_machine_soda_drop" );
          player maps\mp\killstreaks\_killstreaks::giveKillstreak( level.streaks[RandomInt( level.streaks.size )], true );
                              wait 1;
                        }
                wait .25;
        }  
}  

Effects(box)
{
             flare = loadfx("misc/flare_ambient_green");
             fx1 = SpawnFx(flare, box.origin);
             TriggerFX(fx1);
             fx2 = SpawnFx(flare, box.origin+(0,0,5));
             TriggerFX(fx2);
             wait 5;
             fx1 delete();
             fx2 delete();
}

Bar()
{
            duration = 4.0;
            bar = createPrimaryProgressBar( 25 );
            barText = createPrimaryProgressBarText( 25 );
            barText setText( "^2Getting Streak" );
            bar updateBar( 0, 1 / duration );
            bar.color = (1, 0, 0);
            for(i=0;i<4;i++)
            {
                self playSound( "ui_mp_nukebomb_timer" );
                wait 1;
            }
            wait 3.5;
            bar destroyElem();
            barText destroyElem();
}

And add this in Init()

Code:
level.streaks = [];
              level.streaks[0] = "uav";
              level.streaks[1] = "counter_uav";
              level.streaks[2] = "helicopter";
              level.streaks[3] = "ac130";
              level.streaks[4] = "nuke";
              level.streaks[5] = "emp";
              level.streaks[6] = "predator_missile";
              level.streaks[7] = "helicopter_minigun";
              level.streaks[8] = "precision_airstrike";
              level.streaks[9] = "sentry";
              level.streaks[10] = "helicopter_flares";
              level.streaks[11] = "stealth_airstrike";
              level.streaks[12] = "harrier_airstrike";
Reply

#2
you keep making such a good stuff
--
Reply

#3
Looks good
Reply

#4
You should make a sanbox/gary's mod type of mod that would be epic were u could do what ever you want Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 4,142 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 4,747 11-08-2013, 05:25
Last Post: [HARD] Tony.
  Help choose 2 random players?(1 each team) 26hz 6 4,690 09-12-2013, 17:32
Last Post: Yamato
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,546 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,779 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Receiving a random primary & secondary DidUknowiPwn 5 4,442 07-22-2013, 09:47
Last Post: Yamato
  Duration killstreak The Tronuo 2 2,812 07-12-2013, 18:33
Last Post: The Tronuo
  What script controls the "random" aspect to care packages? akillj 2 3,286 06-05-2013, 11:24
Last Post: akillj
  Preview Tank Killstreak Yamato 16 10,619 05-27-2013, 14:47
Last Post: Yamato
  Random anims master131 14 10,935 05-24-2013, 09:45
Last Post: [HARD] Tony.

Forum Jump:


Users browsing this thread:
1 Guest(s)

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