![]() |
|
[Fixed]code lets Black Ops crash - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Fixed]code lets Black Ops crash (/Thread-Fixed-code-lets-Black-Ops-crash.html) Pages:
1
2
|
[Fixed]code lets Black Ops crash - ddaavvee - 09-08-2011 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? 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;
}RE: code lets Black Ops crash - Tomsen1410 - 09-08-2011 You open this self thread deleteProbar really often. myabe u could show us the code? RE: code lets Black Ops crash - ddaavvee - 09-08-2011 (09-08-2011, 12:26)Tomsen1410 Wrote: You open this self thread deleteProbar really often. myabe u could show us the code? post updated RE: code lets Black Ops crash - JariZ - 09-08-2011 I agree with tomsen, that might be it, altough it depends on what it does yeah um you should really call it before for( ;; ) i think, your calling a shitload of those threads right now RE: code lets Black Ops crash - Tomsen1410 - 09-08-2011 Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one. and btw: credits would be nice for the streak function ; ) RE: code lets Black Ops crash - ddaavvee - 09-08-2011 (09-08-2011, 12:35)Tomsen1410 Wrote: Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one. ok i'll try, and i didn't "release" the code yet, so thats why i wait with the credits
RE: code lets Black Ops crash - JariZ - 09-08-2011 <snip> RE: code lets Black Ops crash - Tomsen1410 - 09-08-2011 (09-08-2011, 12:37)jariz Wrote:(09-08-2011, 12:35)Tomsen1410 Wrote: Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one. i helped him alot. i just wanted to have a little credits not more : ) RE: code lets Black Ops crash - JariZ - 09-08-2011 i already snipped, didnt knew that plz remove the quote lololol RE: code lets Black Ops crash - Tomsen1410 - 09-08-2011 (09-08-2011, 12:41)jariz Wrote: i already snipped, didnt knew that
|