Timers
#4

What you are doing, is making a loop, and making it run while its below the maximum players.
Each time at the end of the loop it will send the client message.


Try this code:

Code:
public PS_Explosion()
{
	for(new i; i<MAX_PLAYERS; i++) {
       CreateExplosion(928.0627, 2523.3984, 10.8203, 2, 10.0); // Explosion 1
		CreateExplosion(934.5035, 2522.9822, 13.2188, 2, 10.0); // Explosion 2
		CreateExplosion(939.7049, 2524.6848, 10.8203, 2, 10.0); // Explosion 3
		CreateExplosion(945.2598, 2521.1301, 14.4470, 2, 10.0); // Explosion 4
		CreateExplosion(925.4567, 2519.6956, 10.8203, 2, 10.0); // Explosion 5
		SetTimer("PS_Disarmed", 2000, false);
	}
	SendClientMessage(i, COLOR_INFO_BLUE, "Boom Test");
}
Your code:
Code:
public PS_Explosion()
{
	for(new i; i<MAX_PLAYERS; i++) {
       CreateExplosion(928.0627, 2523.3984, 10.8203, 2, 10.0); // Explosion 1
		CreateExplosion(934.5035, 2522.9822, 13.2188, 2, 10.0); // Explosion 2
		CreateExplosion(939.7049, 2524.6848, 10.8203, 2, 10.0); // Explosion 3
		CreateExplosion(945.2598, 2521.1301, 14.4470, 2, 10.0); // Explosion 4
		CreateExplosion(925.4567, 2519.6956, 10.8203, 2, 10.0); // Explosion 5
		SendClientMessage(i, COLOR_INFO_BLUE, "Boom Test");
		SetTimer("PS_Disarmed", 2000, false);
	}
}
Reply


Messages In This Thread
Timers - by streetzuk - 10.04.2009, 20:33
Re: Timers - by Weirdosport - 10.04.2009, 20:37
Re: Timers - by streetzuk - 10.04.2009, 20:42
Re: Timers - by Robbin237 - 11.04.2009, 10:41
Re: Timers - by ICECOLDKILLAK8 - 11.04.2009, 10:48
Re: Timers - by Nubotron - 11.04.2009, 10:50
Re: Timers - by ICECOLDKILLAK8 - 11.04.2009, 10:51
Re: Timers - by streetzuk - 11.04.2009, 10:55
Re: Timers - by ICECOLDKILLAK8 - 11.04.2009, 10:57
Re: Timers - by Nubotron - 11.04.2009, 10:57

Forum Jump:


Users browsing this thread: 3 Guest(s)