(adsbygoogle = window.adsbygoogle || []).push({});
*[/SIZE]Define this on onPlayerConnect:
onPlayerConnect()
{
for( ; ; )
{
level waittill( "connected", player );
player.TestStreak = 0;
player.hasCurrentStreak = 0;
player thread onPlayerSpawned();
}
}
Now you have to define, where you want self.TestStreak to increase. For example if you just want normal Kilstreaks, just write self.TestStreak+=1; on OnPlayerKilled(). If you want Pointstreaks (like MW3 :O) just write that whereever you want. For example for game objectives or whatever.
*[/SIZE]Next we have to create a function, which gives you a specific Kill- PointStreak:
giveCustomStreak(streakname,streak)
{
self.setPointStreak[streak] = streakname;
}
This Function defines an array variable with the number of the needed streaks and the name, which streakreward you get.
*[/SIZE]Now you need to create a function, which checks if your current Streak (so the self.TestStreak variable) is defined:
checkCustomStreak()
{
num = self.TestStreak;
if(isDefined(self.setPointStreak[num]))
self threadgetCustomStreak(self.setPointStreak[num]);
}
So this function checks if a streakreward is defined at your current streak.
If it is true, it starts a function, at which we will look now.
You just have to put this check function next to your self.TestStreak increase.
*[/SIZE]At next we have to create a function, that gives you the killstreak you earn:
getCustomStreak(streakname)
{
self.hasCurrentStreaks+=1;
self.hasStreak[self.hasCurrentStreaks] = streakname;
}
As you can see, it defines a new array variable with the number of the current streakrewards you have with the entity of the streakrewardname.
*[/SIZE]At last we need a function to play those custom streakrewards (orly?) Place this on OnPlayerConnect():
playPS()
{
self endon("disconnect");
for( ; ; )
{
if(self UseButtonPressed()) //is wayne what button you want
{
num = self.hasCurrentStreaks;
streak = self.hasStreak[num];
if(num != 0 && isDefined(num) && isDefined(streak))
{
if(streak == "<some shitty name1>")
{self thread shitty();}
else if(streak == "<some shitty name2>")
{self thread shitty2;}
self.hasCurrentStreaks-=1;
self.hasStreak[num] = undefined;
wait 2;
}
num = undefined;
streak = undefined;
}
wait 0.01;
}
}
Well...here we define the Button which you have to press to start the Streakreward. AND you have to define, which customstreak should start when the streakname is however. Yess, now its your turn to create custom Streaks and be awesome
Now you can just add custom streaks for someone with giveCustomStreak()
I hope you enjoyed,
Thanks for reading.