• Страница 1 из 1
  • 1
Фейерверк Advance-rp
Дмитрий Дата: Среда, 19.12.2012, 10:28 | Сообщение # 1 | Сообщить о нерабочей теме


Аватар для Дмитрий

Очень красивый фейерверк для вашего сервера.



[reklama]Ко всем new[/reklama]

Code
new salut[27], Float:xsalut, Float:ysalut, Float:zsalut;  


[reklama]В public OnObjectMoved(objectid)[/reklama]

Code
new Float:x, Float:y, Float:z;
     if(objectid == salut[0]) GetObjectPos(salut[0],x,y,z), DestroyObject(salut[0]), CreateExplosion(x, y , z, 11, 0.5);
      if(objectid == salut[1]) GetObjectPos(salut[1],x,y,z), DestroyObject(salut[1]), CreateExplosion(x, y , z, 11, 0.5);
       if(objectid == salut[2]) GetObjectPos(salut[2],x,y,z), DestroyObject(salut[2]), CreateExplosion(x, y , z, 11, 0.5);
        if(objectid == salut[3]) GetObjectPos(salut[3],x,y,z), DestroyObject(salut[3]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[4]) GetObjectPos(salut[4],x,y,z), DestroyObject(salut[4]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[5]) GetObjectPos(salut[5],x,y,z), DestroyObject(salut[5]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[6]) GetObjectPos(salut[6],x,y,z), DestroyObject(salut[6]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[7]) GetObjectPos(salut[7],x,y,z), DestroyObject(salut[7]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[8]) GetObjectPos(salut[8],x,y,z), DestroyObject(salut[8]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[9]) GetObjectPos(salut[9],x,y,z), DestroyObject(salut[9]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[10]) GetObjectPos(salut[10],x,y,z), DestroyObject(salut[10]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[11]) GetObjectPos(salut[1],x,y,z), DestroyObject(salut[11]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[12]) GetObjectPos(salut[12],x,y,z), DestroyObject(salut[12]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[13]) GetObjectPos(salut[13],x,y,z), DestroyObject(salut[13]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[14]) GetObjectPos(salut[14],x,y,z), DestroyObject(salut[14]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[15]) GetObjectPos(salut[15],x,y,z), DestroyObject(salut[15]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[16]) GetObjectPos(salut[16],x,y,z), DestroyObject(salut[16]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[17]) GetObjectPos(salut[17],x,y,z), DestroyObject(salut[17]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[18]) GetObjectPos(salut[18],x,y,z), DestroyObject(salut[18]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[19]) GetObjectPos(salut[19],x,y,z), DestroyObject(salut[19]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[20]) GetObjectPos(salut[20],x,y,z), DestroyObject(salut[20]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[21]) GetObjectPos(salut[21],x,y,z), DestroyObject(salut[21]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[22]) GetObjectPos(salut[22],x,y,z), DestroyObject(salut[22]), CreateExplosion(x, y , z, 11, 0.5);
     if(objectid == salut[23]) GetObjectPos(salut[23],x,y,z), DestroyObject(salut[23]), CreateExplosion(x, y , z, 11, 0.5);
      if(objectid == salut[24])
     {
         GetObjectPos(salut[24],x,y,z), DestroyObject(salut[24]), CreateExplosion(x, y , z, 11, 0.5);
          if(salut[25] == 45){ DestroyObject(salut[26]); salut[25] = -1; }
         else salutik();
     }  


[reklama]В public OnGameModeInit[/reklama]

Code
salut[25] = -1;  


[reklama]К командам:[/reklama]

Code
else if(strcmp(cmd, "/blow", true) == 0)
     {
         if(salut[25] != -1)return SendClientMessage(playerid, COLOR_WHITE, "{DDA0DD} >> Попробуйте позже");
         ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 6.1, 0, 0, 0, 0, 0,1);
         GetPlayerPos(playerid,xsalut,ysalut,zsalut);
         salut[26] = CreateObject(964,xsalut,ysalut,zsalut,0.0,0.0,0.0)  ;
         salutik();
         return true;
     }  


[reklama]В конец мода:[/reklama]

Code
stock delsalut()
{
     DestroyObject(salut[1]); DestroyObject(salut[2]); DestroyObject(salut[3]);
     DestroyObject(salut[4]); DestroyObject(salut[5]); DestroyObject(salut[6]);
     DestroyObject(salut[7]); DestroyObject(salut[8]); DestroyObject(salut[9]);
     DestroyObject(salut[10]);DestroyObject(salut[11]);DestroyObject(salut[12]);
     DestroyObject(salut[13]);DestroyObject(salut[14]);DestroyObject(salut[15]);
     DestroyObject(salut[16]);DestroyObject(salut[17]);DestroyObject(salut[18]);
     DestroyObject(salut[19]);DestroyObject(salut[20]);DestroyObject(salut[21]);
     DestroyObject(salut[22]);DestroyObject(salut[23]);DestroyObject(salut[24]);
     return true;
}
stock salutik()
         {
             delsalut();
             delsalut();
             delsalut();
             delsalut();
             delsalut();
             //Не удивляйтесь что так много удалений, с первого раза не удаляет, не понимаю почему, никто не понимает ...((
             salut[0] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[1] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[2] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[3] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[4] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[5] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[6] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[7] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[8] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[9] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[10] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[11] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[12] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[13] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[14] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[15] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[16] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[17] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[18] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[19] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[20] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[21] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[22] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[23] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             salut[24] = CreateObject(Randomm(19121,19127),xsalut,ysalut,zsalut,0.0,0.0,0.0);
             MoveObject(salut[0],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[1],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[2],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[3],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[4],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[5],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[6],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[7],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[8],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[9],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[10],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[11],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[12],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[13],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[14],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[15],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[16],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[17],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[18],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[19],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[20],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[21],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[22],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[23],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             MoveObject(salut[24],xsalut+Randomm(-30,30),ysalut+Randomm(-30,30),zsalut+Randomm(40,60),Randomm(35,50));
             salut[25] ++;
             return true;
         }

         stock Randomm(min, max)
{
     new a = random(max - min) + min;
     return a;
}  


[admin]Автор: plakapenka[/admin]


From Russia With Love!
  • Страница 1 из 1
  • 1
Поиск: