PASTEBIN MOORS.IN

გვერდების ძიება
ბოლოს დამატებული
Farm By: JaNNeLa / MSTudio Gro
  1. //=============== NEW ====================//
  2. //======= FERMIS ====//
  3. new fermis[7];//pickebi
  4. new minerpick;
  5. new gogris[MAX_PLAYERS];
  6. new gogra[MAX_PLAYERS];
  7. new Oldminerskin[MAX_PLAYERS];
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. //============ Yvela Stock'თან ===========//
  15. //==== fermis
  16. stock Fermis(playerid)
  17. {
  18.         if(IsPlayerInRangeOfPoint(playerid, 5.0, -238.74812, -1351.52808, 6.48670))//1-Ã¥ ìåñòî äîáû÷è
  19.         {
  20.         if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  21.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  22.         SetPVarInt(playerid,"Ferma",1);
  23.                 SetTimerEx("fermtimer",5000,0,"%d",playerid);
  24.             return 1;
  25.         }
  26.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -246.54472, -1351.29456, 7.22786))//2-Ã¥ ìåñòî äîáû÷è
  27.         {
  28.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  29.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  30.         SetPVarInt(playerid,"Ferma",1);
  31.                 SetTimerEx("fermtimer",5000,0,"%d",playerid);
  32.             return 1;
  33.         }
  34.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -243.41266, -1342.69543, 6.41274))//3-Ã¥ ìåñòî äîáû÷è
  35.         {
  36.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  37.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  38.         SetPVarInt(playerid,"Ferma",1);
  39.                 SetTimerEx("fermtimer",5000,0,"%d",playerid);
  40.             return 1;
  41.         }
  42.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -217.49777, -1331.37573, 9.85644))//4-Ã¥ ìåñòî äîáû÷è
  43.         {
  44.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  45.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  46.             SetPVarInt(playerid,"Ferma",1);
  47.             SetTimerEx("fermtimer",5000,0,"%d",playerid);
  48.             return 1;
  49.         }
  50.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -207.16600, -1333.66211, 9.25631))//5-Ã¥ ìåñòî äîáû÷è
  51.         {
  52.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  53.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  54.             SetPVarInt(playerid,"Ferma",1);
  55.             SetTimerEx("fermtimer",5000,0,"%d",playerid);
  56.             return 1;
  57.         }
  58.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -213.98917, -1383.53064, 5.08855))//6-Ã¥ ìåñòî äîáû÷è
  59.         {
  60.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  61.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  62.             SetPVarInt(playerid,"Ferma",1);
  63.             SetTimerEx("fermtimer",5000,0,"%d",playerid);
  64.             return 1;
  65.         }
  66.         else if(IsPlayerInRangeOfPoint(playerid, 5.0, -223.79475, -1379.25903, 6.50434))//7-Ã¥ ìåñòî äîáû÷è
  67.         {
  68.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  69.             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0,1);
  70.             SetPVarInt(playerid,"Ferma",1);
  71.             SetTimerEx("fermtimer",5000,0,"%d",playerid);
  72.             return 1;
  73.         }
  74.         return 1;
  75. }
  76. //===//
  77.  
  78.  
  79.  
  80. //==================== OnPlayerConnect =================//
  81.         SetPVarInt(playerid,"GoFerm",0);//fermis
  82.         SetPVarInt(playerid,"Ferma",0);//fermis
  83.  
  84.  
  85. //================== OnDialogResponse =================//
  86.  
  87. case 9991:
  88.                 {
  89.            if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "{9ACD32}Tqven Uari Tqvit Samushaoze!");
  90.            SetPVarInt(playerid,"GoFerm",1);
  91.            SetPVarInt(playerid,"Ferma",0);
  92.            Oldminerskin[playerid] = GetPlayerSkin(playerid);
  93.                    SetPlayerSkin(playerid, 158);
  94.                    //SetPlayerAttachedObject( playerid, 3, 18634, 6, 0.078222, 0.000000, 0.110844, 298.897308, 264.126861, 193.350555, 1.000000, 1.000000, 1.000000 );
  95.                    SendClientMessage(playerid,-1,"{FFFFFF}Tqven Daiwyet Mushaoba Fermerad. {6A5ACD}Wadit Moagrovet Gogrebi.");
  96.            return 1;
  97.                 }
  98.         case 9992:
  99.         {
  100.            if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "{9ACD32}Tqven Agrdzelebt Samushaos.");
  101.                    new te[100];
  102.                    SetPVarInt(playerid,"GoFerm",0);
  103.                    SetPVarInt(playerid,"Ferma",0);
  104.                    SetPlayerSkin(playerid, Oldminerskin[playerid]);
  105.                    PlayerInfo[playerid][pCash] += gogra[playerid]*5;
  106.                    format(te,sizeof(te),"{FFFFFF}Samushao Dge Dasrulda. {6A5ACD}Tqveni Xelfasi: %d.",gogra[playerid]*5);
  107.            SendClientMessage(playerid,-1,te);
  108.                    gogris[playerid] = 0;
  109.                    gogra[playerid] = 0;
  110.                    OnPlayerUpdateAc(playerid);
  111.                    if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  112.                    if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
  113.            return 1;
  114.         }
  115.  
  116.  
  117. //============== OnPlayerDisconnect ============//
  118.         gogris[playerid] = 0;//Fermis
  119.         gogra[playerid] = 0;//Fermis
  120.         SetPVarInt(playerid,"Ferma",0);//ferma
  121.         SetPVarInt(playerid,"GoFerm",0);//ferma
  122.  
  123.  
  124.  
  125.  
  126.  
  127. //==============OnPlayerEnterCheckpoint ==========//
  128.  
  129.         if(GetPVarInt(playerid,"Ferma") == 1)//fermis
  130.         {
  131.         DisablePlayerCheckpoint(playerid);
  132.         gogris[playerid] = random(50);
  133.         gogra[playerid] = gogra[playerid] + gogris[playerid];
  134.             new text[150];
  135.             format(text,sizeof(text),"{9ACD32}Tqveni Gogra iwonis {FF0000}%d{9ACD32} KG. {FFA500}Sul Mokrefili Gogrebis Wona {FFFFFF}%d{FFA500} KG.",gogris[playerid],gogra[playerid]);
  136.             SendClientMessage(playerid,-1,text);
  137.             gogris[playerid] = 0;
  138.         SetPVarInt(playerid,"Ferma",0);
  139.             if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
  140.         ClearAnim(playerid);
  141.             //SetPlayerAttachedObject( playerid, 3, 2228, 6, 0.078222, 0.000000, 0.110844, 298.897308, 264.126861, 193.350555, 1.000000, 1.000000, 1.000000 );
  142.             return 1;
  143.         }//fermis
  144.  
  145.  
  146.  
  147. //========== ყველა Public'თან =========//
  148. //fermis
  149. forward fermtimer(playerid);
  150. public fermtimer(playerid)
  151. {
  152.         if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  153.         SendClientMessage(playerid,-1,"Tqven Mokrifet Gogra! Waiget Sawyobshi.");
  154.         ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,1,1);
  155.         SetPlayerAttachedObject( playerid, 4, 19320, 1, 0.184699, 0.426247, 0.000000, 259.531341, 80.949592, 0.000000, 0.876124, 0.868181, 0.870769);
  156.         SetPlayerCheckpoint(playerid, -193.77097, -1395.87622, 3.88145, 5.0);
  157.         return 1;
  158. }
  159.  
  160.  
  161. //=========== OnPlayerPickUpDynamicPickup ან იქ სადაც PickUpების ფუნქციებია ========//
  162. //--- FERMIS ----//
  163.         if(pickupid >= fermis[0] && pickupid <= fermis[6])//pickupid >= meriistvis[0] && pickupid <= meriistvis[1]
  164.         {
  165.         if(GetPVarInt(playerid,"GoFerm") == 1)
  166.                 {
  167.                     if(GetPVarInt(playerid,"Ferma") == 0)
  168.                     {
  169.                         Fermis(playerid);
  170.                         return 1;
  171.                     }
  172.                 }
  173.         }
  174.  
  175.         if(pickupid ==  minerpick)
  176.         {
  177.                 if(GetPVarInt(playerid,"GoFerm")==0)
  178.                 {
  179.                         return ShowPlayerDialogEx(playerid,9991,DIALOG_STYLE_MSGBOX,"{00BFFF}FERMA","{FFFFFF}Fermerad Mushaoba.","Dawyeba","Uaryofa");
  180.                 }
  181.                 else
  182.                 {
  183.                     return ShowPlayerDialogEx(playerid,9992,DIALOG_STYLE_MSGBOX,"{00BFFF}FERMA","{FFFFFF}Darwmunebuli Xart, Rom Gindat Dasruleba?.","Diax","Uaryofa");
  184.                 }
  185.         }
  186.  
  187.  
  188. //=============== OnGameModeInit =============//
  189.         //==== FERMIS ===//
  190.         fermis[0] = CreatePickup(19605,23,-238.74812, -1351.52808, 6.48670);
  191.         fermis[1] = CreatePickup(19605,23,-246.54472, -1351.29456, 7.22786);
  192.         fermis[2] = CreatePickup(19605,23,-243.41266, -1342.69543, 6.41274);
  193.         fermis[3] = CreatePickup(19605,23,-217.49777, -1331.37573, 9.85644);
  194.         fermis[4] = CreatePickup(19605,23,-207.16600, -1333.66211, 9.25631);
  195.         fermis[5] = CreatePickup(19605,23,-213.98917, -1383.53064, 5.08855);
  196.         fermis[6] = CreatePickup(19605,23,-223.79475, -1379.25903, 6.50434);
  197.         minerpick = CreatePickup(1275, 23, -190.17207, -1393.58398, 5.20666);//maika
  198.         CreateDynamicMapIcon(-190.17207, -1393.58398, 5.20666,51,0);//FERMIS
  199.  
  200.  
Parsed in 0.037 seconds