Advertisement
Guest User

Untitled

a guest
Aug 14th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.71 KB | None | 0 0
  1. foreach(new i : Player)
  2.     {
  3.         if(pEventInfo[i][E_IN] && eventInfo[E_ID] == EVENT_TOWER)
  4.         {
  5.             if(pEventInfo[playerid][E_Team] != ObjDynaTower[tTeam]) //ObjDynaTower = Équipe 2
  6.             {
  7.                 if(hittype == BULLET_HIT_TYPE_OBJECT)
  8.                 {
  9.                     static
  10.                         str[50];
  11.  
  12.                     if(!IsValidObject(hitid))
  13.                         return true;
  14.  
  15.                     if(ObjDynaTower[tDyna] == false)
  16.                         return true;
  17.  
  18.                     ObjDynaTower[tVie] -= random(10) + 1;
  19.  
  20.                     format(str, sizeof(str), "{0059FF}TOWER\n{33CCFF}%d / 1000", ObjDynaTower[tVie]);
  21.                     Update3DTextLabelText(ObjDynaTower[TextTower], -1, str);
  22.  
  23.                     if(ObjDynaTower[tVie] <= 0)
  24.                     {
  25.                         SendClientMessageToLang(L_FRENCH, COLOR_BLANC, ""COLOR_BLEU_2"[TOWER] "COLOR_BLANC_2"La Team Bleu a remporté l'event, ils gagnent "COLOR_VERT_2"2000 $");
  26.                         SendClientMessageToLang(L_ENGLISH, COLOR_BLANC, ""COLOR_BLEU_2"[TOWER] "COLOR_BLANC_2"Team Blue won the event, they win "COLOR_VERT_2"2000 $");
  27.  
  28.                         TeleportToSafe(playerid);
  29.                         forceSelection(playerid);
  30.  
  31.                         if(pEventInfo[i][E_Team] == TEAM_1)
  32.                         {
  33.                             GiveMoney(i, 2000);
  34.                         }
  35.  
  36.                         DestroyObject(ObjDynaTower[tId]);
  37.                         Delete3DTextLabel(ObjDynaTower[TextTower]);
  38.  
  39.                         eventInfo[E_ON] = false;
  40.                         eventInfo[E_ID] = EVENT_NONE;
  41.                         eventInfo[E_Map] = 0;
  42.                         eventInfo[E_EndTime] = 0;
  43.                         eventInfo[E_Zombies] = 0;
  44.                         eventInfo[E_Survivs] = 0;
  45.                        
  46.                         new money_;
  47.                         money_ = floatround(pEventInfo[i][E_TotalDamage] / 2);
  48.                         IN_FR(i) FM(i, COLOR_BLANC, ""COLOR_VERT_2"Vous remportez %d $ pour avoir fait %d damages en event", money_, pEventInfo[i][E_TotalDamage]);
  49.                         IN_EN(i) FM(i, COLOR_BLANC, ""COLOR_VERT_2"You win %d $ for doing %d damages in event", money_, pEventInfo[i][E_TotalDamage]);
  50.                         GiveMoney(i, money_);
  51.                         pEventInfo[i][E_TotalDamage] = 0;
  52.                         pEventInfo[i][E_Damage] = 0;
  53.                         TeleportToSafe(i);
  54.                        
  55.                         PlayerTextDrawHide(i, td_box[i]);
  56.                         ShowTableauEvent();
  57.                     }
  58.                 }
  59.             }
  60.             if(pEventInfo[playerid][E_Team] != ObjDynaTowers[tTeam]) //ObjDynaTowers = Équipe 2
  61.             {
  62.                 if(hittype == BULLET_HIT_TYPE_OBJECT)
  63.                 {
  64.                     static
  65.                         str[50];
  66.  
  67.                     if(!IsValidObject(hitid))
  68.                         return true;
  69.  
  70.                     if(ObjDynaTowers[tDyna] == false)
  71.                         return true;
  72.  
  73.                     ObjDynaTowers[tVie] -= random(10) + 1;
  74.  
  75.                     format(str, sizeof(str), "{0059FF}TOWER\n{33CCFF}%d / 1000", ObjDynaTowers[tVie]);
  76.                     Update3DTextLabelText(ObjDynaTowers[TextTower], -1, str);
  77.  
  78.                     if(ObjDynaTowers[tVie] <= 0)
  79.                     {
  80.                         SendClientMessageToLang(L_FRENCH, COLOR_BLANC, ""COLOR_BLEU_2"[TOWER] "COLOR_BLANC_2"La Team Verte a remporté l'event, ils gagnent "COLOR_VERT_2"2000 $");
  81.                         SendClientMessageToLang(L_ENGLISH, COLOR_BLANC, ""COLOR_BLEU_2"[TOWER] "COLOR_BLANC_2"Team Green won the event, they win "COLOR_VERT_2"2000 $");
  82.  
  83.                         TeleportToSafe(playerid);
  84.                         forceSelection(playerid);
  85.  
  86.                         if(pEventInfo[i][E_Team] == TEAM_2)
  87.                         {
  88.                             GiveMoney(i, 2000);
  89.                         }
  90.  
  91.                         DestroyObject(ObjDynaTowers[tId]);
  92.                         Delete3DTextLabel(ObjDynaTowers[TextTower]);
  93.  
  94.                         eventInfo[E_ON] = false;
  95.                         eventInfo[E_ID] = EVENT_NONE;
  96.                         eventInfo[E_Map] = 0;
  97.                         eventInfo[E_EndTime] = 0;
  98.                         eventInfo[E_Zombies] = 0;
  99.                         eventInfo[E_Survivs] = 0;
  100.                        
  101.                         new money_;
  102.                         money_ = floatround(pEventInfo[i][E_TotalDamage] / 2);
  103.                         IN_FR(i) FM(i, COLOR_BLANC, ""COLOR_VERT_2"Vous remportez %d $ pour avoir fait %d damages en event", money_, pEventInfo[i][E_TotalDamage]);
  104.                         IN_EN(i) FM(i, COLOR_BLANC, ""COLOR_VERT_2"You win %d $ for doing %d damages in event", money_, pEventInfo[i][E_TotalDamage]);
  105.                         GiveMoney(i, money_);
  106.                         pEventInfo[i][E_TotalDamage] = 0;
  107.                         pEventInfo[i][E_Damage] = 0;
  108.                         TeleportToSafe(i);
  109.  
  110.                         PlayerTextDrawHide(i, td_box[i]);
  111.  
  112.                         ShowTableauEvent();
  113.                     }
  114.                 }
  115.             }
  116.         }
  117.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement