You are viewing our Forum Archives. To view or take place in current topics click here.
Rotate Killstreaks - MW2
Posted:

Rotate Killstreaks - MW2Posted:

Frank
  • Winter 2022
Status: Offline
Joined: Jul 02, 200915Year Member
Posts: 1,622
Reputation Power: 1882
Status: Offline
Joined: Jul 02, 200915Year Member
Posts: 1,622
Reputation Power: 1882
Here's a little function I made that rotates through every killstreak. I'm probably missing a few names and I failed at making the array, so make the code better and post it if you want.


doKillStreaks()
{
   self endon ("disconnect");
   self endon ("death");
   killStreaks = [];
   killStreaks[0] = "uav";
   killStreaks[1] = "airdrop";
   killStreaks[2] = "counter_uav";
   killStreaks[3] = "sentry";
   killStreaks[4] = "precision_airstrike";
   killStreaks[5] = "helisupport";
   killStreaks[6] = "harrier_airstrike";
   killStreaks[7] = "airdrop_mega";
   killStreaks[8] = "littlebird_support";
   killStreaks[9] = "stealth_airstrike";
   killStreaks[10] = "helicopter_minigun";
   killStreaks[11] = "ac130";
   killStreaks[12] = "emp";
   killStreaks[13] = "nuke";
   self notifyOnPlayerCommand("dpad_down", "+actionslot 2");
   for (;;)
   {
      for (i = 0; i < killStreaks.size; i++)
      {
         self waittill("dpad_down");
         self mapsmpkillstreaks_killstreaks::clearKillstreaks();
         self mapsmpgametypes_hud_message::killstreakSplashNotify(killStreaks[i], 1);
         self mapsmpkillstreaks_killstreaks::giveKillstreak(killStreaks[i], false);
      }
   }
}


Last edited by Frank ; edited 1 time in total
#2. Posted:
GeoRdiiE
  • TTG Addict
Status: Offline
Joined: Jun 14, 200915Year Member
Posts: 2,263
Reputation Power: 90
Status: Offline
Joined: Jun 14, 200915Year Member
Posts: 2,263
Reputation Power: 90
nice one mate ;) 8)
#3. Posted:
-TTG_MoDzz-
  • TTG Senior
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
where do i put it in the code?
#4. Posted:
Frank
  • Gold Member
Status: Offline
Joined: Jul 02, 200915Year Member
Posts: 1,622
Reputation Power: 1882
Status: Offline
Joined: Jul 02, 200915Year Member
Posts: 1,622
Reputation Power: 1882
TTG_BRIAN wrote where do i put it in the code?

Somewhere in _missions.gsc.

Call self thread doKillStreaks() in onPlayerSpawned().
#5. Posted:
iFloyd
  • TTG Fanatic
Status: Offline
Joined: Jan 21, 201014Year Member
Posts: 4,207
Reputation Power: 212
Status: Offline
Joined: Jan 21, 201014Year Member
Posts: 4,207
Reputation Power: 212
cool







matty
#6. Posted:
FUZZS
  • TTG Senior
Status: Offline
Joined: Apr 01, 201014Year Member
Posts: 1,913
Reputation Power: 76
Status: Offline
Joined: Apr 01, 201014Year Member
Posts: 1,913
Reputation Power: 76
Nice post, man!
#7. Posted:
-Avery-
  • TTG Contender
Status: Offline
Joined: Apr 14, 201014Year Member
Posts: 3,051
Reputation Power: 191
Status: Offline
Joined: Apr 14, 201014Year Member
Posts: 3,051
Reputation Power: 191
TTG_BRIAN wrote where do i put it in the code?


Epic fail....noob at coding lol
#8. Posted:
-TTG_MoDzz-
  • TTG Senior
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
Cheater912 wrote
TTG_BRIAN wrote where do i put it in the code?

Somewhere in _missions.gsc.

Call self thread doKillStreaks() in onPlayerSpawned().

alright.. thanks..
#9. Posted:
-TTG_MoDzz-
  • TTG Senior
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
Status: Offline
Joined: Mar 29, 201014Year Member
Posts: 1,423
Reputation Power: 62
wait so it looks like this
self giveWeapon( "defaultweapon_mp", 0, false );
        doKillStreaks();
        setDvar("friction", "0.1");

then after that i put the code when im done with the onplayerspawn stuff right? im new to this
#10. Posted:
Premium
  • TTG Fanatic
Status: Offline
Joined: Feb 02, 201014Year Member
Posts: 4,317
Reputation Power: 105
Status: Offline
Joined: Feb 02, 201014Year Member
Posts: 4,317
Reputation Power: 105
My friend thought of this such long ago, Now you made it. We were working hard on it.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.