11.04.2009, 11:24
one last problem, you need to make sure the SetTimer is outside the player loop. At the moment that timer would be triggered as many times as there are players, which is unnecessary.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, X, Y, Z);
SetTimer("MainBoom", 2000, 0); // This <------------
CreateExplosion(X+5,Y,Z,0,1);
CreateExplosion(X,Y+5,Z,0,1);
CreateExplosion(X-5,Y,Z,0,1);
CreateExplosion(X,Y-5,Z,0,1);
}
}
//Belongs here <-------------------------------------------------------