Hi,
I have a killstreak code with and i added a progress bar to it,
The problem is that black ops crashes after a few minutes of playing because of this code.
Anybody knows how to fix it?
I have a killstreak code with and i added a progress bar to it,
The problem is that black ops crashes after a few minutes of playing because of this code.
Anybody knows how to fix it?
Code:
CountKillstreak()
{
self endon("disconnect");
self endon("death");
self.startscore = self.pers["kills"];
self.killcount = 0;
useBar = createPrimaryProgressBar( -250 );
useBarText = createPrimaryProgressBarText( -250 );
useBarText settext("Progress");
useBarText.y = 205;
useBar.bar.y = 220;
useBar.y = 220;
for(;;)
{
self thread deleteProbar(useBar, useBarText);
if(self.killcount != self.pers["kills"] - self.startscore)
{
self.killcount = self.pers["kills"] - self.startscore;
switch(self.killcount)
{
case 2:
{ self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.1);
self takeAllWeapons();
self GiveWeapon("m16_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
case 3:
{self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.2);
self takeAllWeapons();
self GiveWeapon("enfield_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
case 4:
{self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.3);
self takeAllWeapons();
self GiveWeapon("famas_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
case 5:
{self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.4);
self takeAllWeapons();
self GiveWeapon("commando_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
case 6:
{self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.5);
self takeAllWeapons();
self GiveWeapon("m60_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
case 7:
{self iPrintlnBold("Weapon Upgraded!");
usebar updateBar(.6);
self GiveWeapon("tesla_gun_zm", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
break;}
}
}
wait .05;
}
}
deleteProBar(elem1, elem2)
{
self waittill_any("disconnect", "death");
if(isDefined(elem1)) elem1 destroyelem();
if(isDefined(elem2)) elem2 destroy();
wait .05;
}
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz