NB: I didn't make the code ( Credits below )
Make a New GSC file.
Name it: _killstreak.gsc ( You can chage, but I made it based on this name. Will show below.)
#include maps\mp\_utility;
doKillstreaks()
{
self endon ("death");
self.startscore = self.pers["kills"];
while(1) {
if(self.killcount != self.pers["kills"] - self.startscore) {
self.killcount = self.pers["kills"] - self.startscore;
switch(self.killcount)
{
case 1:
//This is the Killstreak Number the player need
self notify("newstreak");
//Here you add the action/thread for what gone happen
break;
case 2:
//This is the Killstreak Number the player need
self notify("newstreak");
//Here you add the action/thread for what gone happen
break;
}
}
wait 0.05;
}
}
How to change the Killstreak Number:
The case ?:
is the Killstreak, so you change that to the wanted Killstreaks the player need until it get's it.
case 1:
case 2:
case 5:
case 10:
How to add Actions:
Code:
case 1: Need 1 Killstreak.
self notify("newstreak");
And here I will but the action. ( But I recommend to use threads to make it easyer to edit. If it's something long. )
break;
____________________________________________________________________________________________________________________
Going to look like this:
case 1: Need 1 Killstreak.
self notify("newstreak");
self giveWeapon( "coltanaconda_mp");
break;
How do I add it:
You will add this line into your GSC ( _rank.gsc ) in the wanted thread OR inside doDvars() / OnPlayerSpawned()
self thread maps\mp\gametypes\_mykillstreaks::doKillstreaks();
And now It will work.
Want to change location or so, it's below.
How to change Location ( File name or Into the _rank.gsc ) :
This line is how to add it from another GSC file:
self thread maps\mp\gametypes\
FILE_NAME::
THREAD_NAME
How to add into _rank.gsc:
You just add it as an thread, simple as that.
Like this:
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread doDvars();
self thread doKillstreaks() ;
}
}
( But It maybe be smart to make the extra GSC file. )
Credits:
H4RDC0R3
Rowan
Me for Make TuT