Exclamation[QUESTION] Custom killstreaks, need fast!

Posts 111 of 11 · Page 1 of 1
[QUESTION] Custom killstreaks, need fast!
Hi all,

As the most know, I'm very busy with my mods...
I have to make something like this;
Code:
Player has a killstreak of 4: UAV
Player has a killstreak of 5: Predator
Player has a killstreak of 6: Player gets a TMP
Player has a killstreak of 8: Precision airstrike
Player has a killstreak of 10: Player gets a RPD
How can I make this? And where should I put the code? In the onPlayerSpawn(); section?

Really really thanks if u can help me! /
Lets see... here something from Ace:
Code:
doReload()
{
  self waittill("killed_enemy");
  kl = self.kills;
  kl += 1;
  if(kl > 10){
    self thread maps\mp\gametypes\_hud_message::hintMessage("Press 'N' To Get More Bullets");
  while( 1 ){
	self notifyOnPlayerCommand("N", "+actionslot 1");
	self waittill("N");
	self giveMaxAmmo("fal_mp");
      }
  }
}

doFrag()
{
   self waittill("killed_enemy");
   kl = self.kills;
   kl += 1;
        if(kl > 5) {
   self thread maps\mp\gametypes\_hud_message::hintMessage("Press '5' to get a frag granade!");
      while( 1 ) {
         self notifyOnPlayerCommand("5", "+actionslot 2");
          self waittill("5");
            self giveWeapon("frag_mp", 0);
         }
     }
}

}
So basicly where it says if(kl > 5 { is how many kills to get that certain thing.
Try make it to your needs, tell me if you dont understand
i don't know but it would be nice if you can make it
Thanks for the code! Unfortunately I don't understand where to put it... I putted the whole code in the mod, but I don't know where to make a connection to it? Should I say;
Code:
onPlayerSpawned()
self thread doStreak();
And then the code;
Code:
doStreak()
{
   self waittill("killed_enemy");
   kl = self.kills;
   kl += 1;
        if(kl > 5) {
   self thread maps\mp\gametypes\_hud_message::hintMessage("^1TMP ^2activated!");
          self waittill("5");
            self giveWeapon("tmp_mp", 0);
         }
     }
}
Or is this wrong? I changed everything so it's should work, but it doesn't.

Please help me!
Quote Originally Posted by Imthebosss View Post
Thanks for the code! Unfortunately I don't understand where to put it... I putted the whole code in the mod, but I don't know where to make a connection to it? Should I say;
Code:
onPlayerSpawned()
self thread doStreak();
Or is this wrong? I changed everything so it's should work, but it doesn't.

Please help me!
Unless you want it for one team, thats correct
But when I start the mod, it's giving an error!
So there should be something wrong...


Quote Originally Posted by Arasonic View Post
Unless you want it for one team, thats correct
Quote Originally Posted by Imthebosss View Post
But when I start the mod, it's giving an error!
So there should be something wrong...
Could you send the code?
Ah wait, didnt see you wrote it up there ^^^^^
1sek

Try something like
Code:
doReload()
{
  self waittill("killed_enemy");
  kl = self.kills;
  kl += 1;
  if(kl > 5){
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1TMP ^2activated!");
  while( 1 ){
	self notifyOnPlayerCommand("N", "+actionslot 1");
	self waittill("N");
	self giveWeapon("tmp_mp", 8);
      }
  }
}
Just change actionslot to whatever you want
I'm testing the code know... I will post it here if it worked



Quote Originally Posted by Arasonic View Post
Could you send the code?
Ah wait, didnt see you wrote it up there ^^^^^
1sek

Try something like
Code:
doReload()
{
  self waittill("killed_enemy");
  kl = self.kills;
  kl += 1;
  if(kl > 5){
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1TMP ^2activated!");
  while( 1 ){
	self notifyOnPlayerCommand("N", "+actionslot 1");
	self waittill("N");
	self giveWeapon("tmp_mp", 8);
      }
  }
}
Just change actionslot to whatever you want
you probably forgot a ; or " in the mod check the whole code on it iuf can't find ask someone to check
Also that is not working
I will try to fix it today, if it worked I will post it here

Thanks to Arasonic for helping so fast!
Posts 111 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?