[HELP]Weird timer bug
#2

The /bomb command creates the first boom

Timer 1 the second

Timer 2 the third and so on

Edit: Also the endless explosions is couse each of the callbacks tells them to call the same function again which makes it loop



Код:
forward ExTimer1(playerid);//The Ex=Explosion
forward ExTimer2(playerid);
forward ExTimer3(playerid);
Код:
if (strcmp("/bomb", cmdtext, true, 10) == 0)
{
CreateExplosion(-1415.4913,490.6862,11.2429,7,100);
SetTimerEx("ExTimer1",1000,0,"d",playerid);
}
Код:
public ExTimer1(playerid)
{
CreateExplosion(-1415.4913,490.6862,11.2429,7,100);
  SetTimerEx("ExTimer2",1000,0,"d",playerid);
return 1;
}
public ExTimer2(playerid)
{
CreateExplosion(-1417.1440,491.5547,11.5640,7,100);
  SetTimerEx("ExTimer3",1000,0,"d",playerid);
return 1;
}
public ExTimer3(playerid)
{
CreateExplosion(-1418.9178,491.6942,13.8101,7,100);
return 1;
}
Reply


Messages In This Thread
[HELP]Weird timer bug - by [XST]O_x - 30.09.2009, 20:09
Re: [HELP]Werid timer bug - by Desert - 30.09.2009, 20:12
Re: [HELP]Werid timer bug - by [XST]O_x - 30.09.2009, 20:15
Re: [HELP]Werid timer bug - by yom - 30.09.2009, 20:16
Re: [HELP]Werid timer bug - by [XST]O_x - 30.09.2009, 20:19

Forum Jump:


Users browsing this thread: 3 Guest(s)