11.04.2009, 10:41
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:
Your code:
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"); }
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); } }