11.04.2017, 15:45
Hello! I want to create Explossion for Medics Factions. I create a Timer who make Explossion every 5 minutes[for testing], but my problem is cause, thats explossion happends all together in all places i have put coordinates.
How to make explosion to start at a time, not all togheter.
Sorry for my english.
How to make explosion to start at a time, not all togheter.
Sorry for my english.
Код:
forward OnBurgerExplosion(); public OnBurgerExplosion(playerid) { static explode2; // Defining the explode if(explode2 == 0) { // If explode2 is just going to start, get prepared and alert! if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) { new string[300]; new turnmes[128]; format(cbjstore, sizeof(turnmes), "HQ: All Units APB, Reporter: {FFFFFF} Un Incediu a fost depistat! Mergeti pentru a-l stinge.",PlayerInfo[playerid],playerid); SendClientMessage(playerid, COLOR_DBLUE, cbjstore); } } // Add your Dispatch message here! } explode2++; // Every explosion, this will go up if(explode2 < 6) // once it explodes 100 times, it will disable itself SetTimer("OnBurgerExplosion", 3000, false); // This makes it disable itself else explode2 = 0; // If this is 0, it will start exploding, because fo the timer CreateExplosion(2438.04688, -1271.21838, 23.22764,2,100); SetPlayerCheckpoint(playerid,2438.04688, -1271.21838, 23.22764,1.0); //CreateExplosion(432.4224, -1297.9946, 25.0137,1,100); //CreateExplosion(2427.9363, -1288.8926, 30.2144,1,100); // X, Y, Z == X = X Coordinates, Y = Y Coordinates, Z = Z Coordinates return 1; }