Mentosan

[FS] Deep Hunter Job

Jul 5th, 2018
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4. #include <streamer>
  5.  
  6. //=============================define=================================================
  7. #define ATENTIE 0xAFAFAFAA
  8. //=============================mews=============================================
  9. new PlayerText:DistanceTD[MAX_PLAYERS];
  10. new
  11.     JOB[MAX_PLAYERS], inJOB[MAX_PLAYERS], Car_Job[MAX_PLAYERS], timer_Car[MAX_PLAYERS],
  12.     Seconds_timer[MAX_PLAYERS], Hunter_Deer[MAX_PLAYERS], Meeters_BTWDeer[MAX_PLAYERS],
  13.     Meeters[MAX_PLAYERS], Deer[MAX_PLAYERS], Deep_Deer[MAX_PLAYERS], Meeter_Kill[MAX_PLAYERS],
  14.     Shoot_Deer[MAX_PLAYERS];
  15. //==============================================================================
  16. public OnFilterScriptInit() {
  17.  
  18.  
  19.     return 1;
  20. }
  21. //==============================================================================
  22. public OnFilterScriptExit()
  23. {
  24.     print("\n--------------------------------------------------");
  25.     print("    FILTERSCRIPT BY MENTOSAN (sa-mp.com: Kristsall) ");
  26.     print("  ~ Hunter ca pe NEFRIT ~                            ");
  27.     print("----------------------------------------------------\n");
  28.  
  29.     //Acest job este inspirat de pe NEPHRITE, AM VAZUT CUM ESTE, MI-AM FACUT O IDEE CUM L-A FACUT KSENON
  30.      // SI AM INCERCAT SA-L FAC SI EU, CAT DE BINE ESTE REPRODUS, ASTA O DECIDETI VOI
  31.       // VA ROG DACA LUATI FS-UL, DATI-MI CREDITE. MULTUMESC DE DOWNLOAD!
  32.  
  33.     return 1;
  34. }
  35. //==============================================================================
  36. public OnGameModeInit() {
  37.  
  38.     CreateActor(139, 2354.5510, -658.7446, 128.0284, -90.5);
  39.     Create3DTextLabel("{3CB371}Hunter JOB {FFFAFA}\n Tasteaza {3CB371}[/getjob]{FFFAFA} pentru a lua jobul", -1, 2355.0962, -658.8605, 128.0284, 10.5, 0, 0);
  40.  
  41.     return 1;
  42. }
  43.  
  44. //======================STOCK'S=================================================
  45. stock GetDistance( Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2 )
  46. {
  47.     return floatround( floatsqroot( ( (x1 - x2) * (x1 - x2) ) + ( (y1 - y2) * (y1 - y2) ) + ( (z1 - z2) * (z1 - z2) ) )  );
  48. }
  49. //======================FORWARD'S=================================================
  50. forward Detectare_Intrare(playerid);
  51. forward Next_Deer(playerid);
  52. forward Detect_M(playerid);
  53. forward Done_Deer(playerid);
  54. //==============================================================================
  55.  
  56. public OnPlayerConnect(playerid) {
  57.  
  58.     JOB[playerid] = 0;
  59.     inJOB[playerid] = 0;
  60.  
  61.     DistanceTD[playerid] = CreatePlayerTextDraw(playerid, 87.333358, 317.573242, "Distanta_xxxM");
  62.     PlayerTextDrawLetterSize(playerid, DistanceTD[playerid], 0.363428, 1.297067);
  63.     PlayerTextDrawTextSize(playerid, DistanceTD[playerid], 0.000000, 111.000000);
  64.     PlayerTextDrawAlignment(playerid, DistanceTD[playerid], 2);
  65.     PlayerTextDrawColor(playerid, DistanceTD[playerid], -1);
  66.     PlayerTextDrawUseBox(playerid, DistanceTD[playerid], 1);
  67.     PlayerTextDrawBoxColor(playerid, DistanceTD[playerid], 112);
  68.     PlayerTextDrawSetShadow(playerid, DistanceTD[playerid], 0);
  69.     PlayerTextDrawSetOutline(playerid, DistanceTD[playerid], 1);
  70.     PlayerTextDrawBackgroundColor(playerid, DistanceTD[playerid], 189);
  71.     PlayerTextDrawFont(playerid, DistanceTD[playerid], 1);
  72.     PlayerTextDrawSetProportional(playerid, DistanceTD[playerid], 1);
  73.     PlayerTextDrawSetShadow(playerid, DistanceTD[playerid], 0);
  74.  
  75.     return 1;
  76.  
  77. }
  78.  
  79. public OnPlayerDeath(playerid, killerid, reason) {
  80.  
  81.  
  82.     return 1;
  83. }
  84.  
  85.  
  86. //================================[FUNCTII]====================================
  87. public Detectare_Intrare(playerid) {
  88.     if(Seconds_timer[playerid] == 120) {
  89.         Seconds_timer[playerid] = 0;
  90.         inJOB[playerid] = 0;
  91.         ResetPlayerWeapons(playerid);
  92.         DestroyVehicle(Car_Job[playerid]);
  93.         KillTimer(Meeters_BTWDeer[playerid]);
  94.         DestroyObject(Hunter_Deer[playerid]);
  95.         PlayerTextDrawHide(playerid, DistanceTD[playerid]);
  96.         DisablePlayerCheckpoint(playerid);
  97.         Deep_Deer[playerid] = 0;
  98.         Deer[playerid] = 0;
  99.         Shoot_Deer[playerid] = 0;
  100.         KillTimer(timer_Car[playerid]);
  101.     }else {
  102.         Seconds_timer[playerid]++;
  103.     }
  104.  
  105.     return 1;
  106. }
  107.  
  108. public Done_Deer(playerid) {
  109.     new money = random(500) + 1000, mesaj[256], bonus;
  110.     if(Meeter_Kill[playerid] >= 40) {
  111.         bonus = 500 + random(100);
  112.         money += bonus;
  113.     }
  114.     format(mesaj, sizeof(mesaj), "{1e90ff}(JOB):{FFFFFF} Pentru pielea acestei caprioare ai primit {7cfc00}${FFFFFF}%d.", money);
  115.     SendClientMessage(playerid, -1, mesaj);
  116.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  117.     ClearAnimations(playerid, 0);
  118.     GivePlayerMoney(playerid, money);
  119.     DestroyObject(Hunter_Deer[playerid]);
  120.     TogglePlayerControllable(playerid, 1);
  121.     SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  122.  
  123.     return 1;
  124. }
  125.  
  126. public Detect_M(playerid) {
  127.     new Float:x, Float:y, Float:z, mesaj[256];
  128.     GetPlayerPos(playerid, x, y, z);
  129.     if(Deer[playerid] == 1) {
  130.         Meeters[playerid] = GetDistance(x, y, z, 2046.7698, -799.4532, 127.0796);
  131.     }else if(Deer[playerid] == 2) {
  132.         Meeters[playerid] = GetDistance(x, y, z, 2021.18176, -494.02066, 76.19036);
  133.     }else if(Deer[playerid] == 3) {
  134.         Meeters[playerid] = GetDistance(x, y, z, 1632.5769, -599.7444, 62.0889);
  135.     }else if(Deer[playerid] == 4) {
  136.         Meeters[playerid] = GetDistance(x, y, z, 1741.4386, -979.5817, 36.9209);
  137.     }else if(Deer[playerid] == 5) {
  138.         Meeters[playerid] = GetDistance(x, y, z, 2553.6780, -963.4338, 82.0169);
  139.     }else if(Deer[playerid] == 6) {
  140.         Meeters[playerid] = GetDistance(x, y, z, 2637.4963, -380.2195, 58.2060);
  141.     }else if(Deer[playerid] == 7) {
  142.         Meeters[playerid] = GetDistance(x, y, z, 2406.9773, -403.4681, 72.4926);
  143.     }
  144.  
  145.     format(mesaj, sizeof(mesaj), "Distanta_%dM", Meeters[playerid]);
  146.     PlayerTextDrawSetString(playerid, DistanceTD[playerid], mesaj);
  147.     PlayerTextDrawShow(playerid, DistanceTD[playerid]);
  148.  
  149.     return 1;
  150. }
  151.  
  152. public Next_Deer(playerid) {
  153.     new rand = random(8), mesaj[256];
  154.     format(mesaj, sizeof(mesaj), "{1e90ff}(JOB):{FFFFFF} Du-te si omoara caprioara de la o distanta de minim 20M pentru a fi recompensat. ");
  155.     SendClientMessage(playerid, -1, mesaj);
  156.     switch(rand) {
  157.         case 1: {
  158.             Deer[playerid] = 1;
  159.             Hunter_Deer[playerid] = CreateObject(19315, 2046.76978, -799.45319, 127.07957,   0.00000, 0.00000, 0.00000);
  160.             SetPlayerCheckpoint(playerid, 2046.76978, -799.45319, 127.07957, 1.0);
  161.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  162.         }
  163.         case 2: {
  164.             Deer[playerid] = 3;
  165.             Hunter_Deer[playerid] = CreateObject(19315, 1632.57690, -599.74438, 62.08893,   0.00000, 0.00000, -52.38000);
  166.             SetPlayerCheckpoint(playerid, 1632.5769, -599.7444, 62.0889, 1.0);
  167.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  168.         }
  169.         case 3: {
  170.             Deer[playerid] = 4;
  171.             Hunter_Deer[playerid] = CreateObject(19315, 1741.43860, -979.58167, 36.92095,   0.00000, 0.00000, -7.38000);
  172.             SetPlayerCheckpoint(playerid, 1741.4386, -979.5817, 36.9209, 1.0);
  173.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  174.         }
  175.         case 4: {
  176.             Deer[playerid] = 5;
  177.             Hunter_Deer[playerid] = CreateObject(19315, 2553.67798, -963.43384, 82.01694,   0.00000, 0.00000, 0.00000);
  178.             SetPlayerCheckpoint(playerid, 2553.6780, -963.4338, 82.0169, 1.0);
  179.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  180.         }
  181.         case 5: {
  182.             Deer[playerid] = 6;
  183.             Hunter_Deer[playerid] = CreateObject(19315, 2637.49634, -380.21954, 58.20603,   0.00000, 0.00000, -49.26000);
  184.             SetPlayerCheckpoint(playerid, 2637.4963, -380.2195, 58.2060, 1.0);
  185.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  186.         }
  187.         case 6: {
  188.             Deer[playerid] = 7;
  189.             Hunter_Deer[playerid] = CreateObject(19315, 2406.97729, -403.46808, 72.49255,   0.00000, 0.00000, 0.00000);
  190.             SetPlayerCheckpoint(playerid, 2406.9773, -403.4681, 72.4926, 1.0);
  191.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  192.         }
  193.         default: {
  194.             Deer[playerid] = 2;
  195.             Hunter_Deer[playerid] = CreateObject(19315, 2021.18176, -494.02066, 76.19036,   0.00000, 0.00000, -71.64002);
  196.             SetPlayerCheckpoint(playerid, 2021.18176, -494.02066, 76.19036, 1.0);
  197.             Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  198.         }
  199.     }
  200.  
  201.     return 1;
  202. }
  203.  
  204.  
  205.  
  206. //==============================================================================
  207.  
  208. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
  209.    
  210.     if(Deer[playerid] == 1) {
  211.         if(weaponid == 33) {
  212.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  213.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 2046.76978, -799.45319, 127.07957) && Shoot_Deer[playerid] == 0) {
  214.                     KillTimer(Meeters_BTWDeer[playerid]);
  215.                     Meeter_Kill[playerid] = Meeters[playerid];
  216.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  217.  
  218.                     if(Meeter_Kill[playerid] >= 20) {
  219.                         Shoot_Deer[playerid] = 1;
  220.                         new mesaj[256];
  221.                         MoveObject(Hunter_Deer[playerid], 2046.7698, -799.4532, 126.7188, 3.5, -90.0000, 0.0000, 0.0000);
  222.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasant CTRL. ", Meeter_Kill[playerid]);
  223.                         SendClientMessage(playerid, -1, mesaj);
  224.                         Deep_Deer[playerid] = 1;
  225.                     }else {
  226.                         new mesaj[256];
  227.                         DestroyObject(Hunter_Deer[playerid]);
  228.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  229.                         SendClientMessage(playerid, -1, mesaj);
  230.                         DisablePlayerCheckpoint(playerid);
  231.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  232.                     }
  233.                 }
  234.             }
  235.         }
  236.     }else if(Deer[playerid] == 2) {
  237.         if(weaponid == 33) {
  238.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  239.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 2021.1818, -494.0207, 76.1904) && Shoot_Deer[playerid] == 0) {
  240.                     KillTimer(Meeters_BTWDeer[playerid]);
  241.                     Meeter_Kill[playerid] = Meeters[playerid];
  242.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  243.  
  244.                     if(Meeter_Kill[playerid] >= 20) {
  245.                         Shoot_Deer[playerid] = 1;
  246.                         new mesaj[256];
  247.                         MoveObject(Hunter_Deer[playerid], 2021.18176, -494.02069, 76.19040, 3.5, -90.0000, 0.0000, 0.0000);
  248.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasat CTRL. ", Meeter_Kill[playerid]);
  249.                         SendClientMessage(playerid, -1, mesaj);
  250.                         Deep_Deer[playerid] = 1;
  251.                     }else {
  252.                         new mesaj[256];
  253.                         DestroyObject(Hunter_Deer[playerid]);
  254.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  255.                         SendClientMessage(playerid, -1, mesaj);
  256.                         DisablePlayerCheckpoint(playerid);
  257.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  258.                     }
  259.                 }
  260.             }
  261.         }
  262.     }else if(Deer[playerid] == 3) {
  263.         if(weaponid == 33) {
  264.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  265.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 1632.5769, -599.7444, 62.0889) && Shoot_Deer[playerid] == 0) {
  266.                     KillTimer(Meeters_BTWDeer[playerid]);
  267.                     Meeter_Kill[playerid] = Meeters[playerid];
  268.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  269.  
  270.                     if(Meeter_Kill[playerid] >= 20) {
  271.                         Shoot_Deer[playerid] = 1;
  272.                         new mesaj[256];
  273.                         MoveObject(Hunter_Deer[playerid], 1632.57690, -599.74438, 61.82332, 3.5, 90.00000, 0.00000, -54.66002);
  274.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasand CTRL. ", Meeter_Kill[playerid]);
  275.                         SendClientMessage(playerid, -1, mesaj);
  276.                         Deep_Deer[playerid] = 1;
  277.                     }else {
  278.                         new mesaj[256];
  279.                         DestroyObject(Hunter_Deer[playerid]);
  280.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  281.                         SendClientMessage(playerid, -1, mesaj);
  282.                         DisablePlayerCheckpoint(playerid);
  283.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  284.                     }
  285.  
  286.                 }
  287.             }
  288.         }
  289.     }else if(Deer[playerid] == 4) {
  290.         if(weaponid == 33) {
  291.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  292.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 1741.4386, -979.5817, 36.9209) && Shoot_Deer[playerid] == 0) {
  293.                     KillTimer(Meeters_BTWDeer[playerid]);
  294.                     Meeter_Kill[playerid] = Meeters[playerid];
  295.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  296.  
  297.                     if(Meeter_Kill[playerid] >= 20) {
  298.                         Shoot_Deer[playerid] = 1;
  299.                         new mesaj[256];
  300.                         MoveObject(Hunter_Deer[playerid], 1741.43860, -979.58173, 36.61147, 3.5, 90.00000, 0.00000, -7.38000);
  301.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasand CTRL. ", Meeter_Kill[playerid]);
  302.                         SendClientMessage(playerid, -1, mesaj);
  303.                         Deep_Deer[playerid] = 1;
  304.                     }else {
  305.                         new mesaj[256];
  306.                         DestroyObject(Hunter_Deer[playerid]);
  307.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  308.                         SendClientMessage(playerid, -1, mesaj);
  309.                         DisablePlayerCheckpoint(playerid);
  310.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  311.                     }
  312.                 }
  313.             }
  314.         }
  315.     }else if(Deer[playerid] == 5) {
  316.         if(weaponid == 33) {
  317.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  318.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 2553.6780, -963.4338, 82.0169) && Shoot_Deer[playerid] == 0) {
  319.                     KillTimer(Meeters_BTWDeer[playerid]);
  320.                     Meeter_Kill[playerid] = Meeters[playerid];
  321.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  322.  
  323.                     if(Meeter_Kill[playerid] >= 20) {
  324.                         Shoot_Deer[playerid] = 1;
  325.                         new mesaj[256];
  326.                         MoveObject(Hunter_Deer[playerid], 2553.67798, -963.43378, 81.66848, 3.5, 90.00000, 0.00000, 0.00000);
  327.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasand CTRL. ", Meeter_Kill[playerid]);
  328.                         SendClientMessage(playerid, -1, mesaj);
  329.                         Deep_Deer[playerid] = 1;
  330.                     }else {
  331.                         new mesaj[256];
  332.                         DestroyObject(Hunter_Deer[playerid]);
  333.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  334.                         SendClientMessage(playerid, -1, mesaj);
  335.                         DisablePlayerCheckpoint(playerid);
  336.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  337.                     }
  338.                 }
  339.             }
  340.         }
  341.     }else if(Deer[playerid] == 6) {
  342.         if(weaponid == 33) {
  343.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  344.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 2637.4963, -380.2195, 58.2060) && Shoot_Deer[playerid] == 0) {
  345.                     KillTimer(Meeters_BTWDeer[playerid]);
  346.                     Meeter_Kill[playerid] = Meeters[playerid];
  347.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  348.  
  349.                     if(Meeter_Kill[playerid] >= 20) {
  350.                         Shoot_Deer[playerid] = 1;
  351.                         new mesaj[256];
  352.                         MoveObject(Hunter_Deer[playerid], 2637.49634, -380.21951, 57.92605, 3.5, 90.00000, 0.00000, -49.26000);
  353.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasand CTRL. ", Meeter_Kill[playerid]);
  354.                         SendClientMessage(playerid, -1, mesaj);
  355.                         Deep_Deer[playerid] = 1;
  356.                     }else {
  357.                         new mesaj[256];
  358.                         DestroyObject(Hunter_Deer[playerid]);
  359.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  360.                         SendClientMessage(playerid, -1, mesaj);
  361.                         DisablePlayerCheckpoint(playerid);
  362.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  363.                     }
  364.                 }
  365.             }
  366.         }
  367.     }else if(Deer[playerid] == 7) {
  368.         if(weaponid == 33) {
  369.             if(hittype == BULLET_HIT_TYPE_OBJECT) {
  370.                 if(IsPlayerInRangeOfPoint(playerid, 100.0, 2406.9773, -403.4681, 72.4926) && Shoot_Deer[playerid] == 0) {
  371.                     KillTimer(Meeters_BTWDeer[playerid]);
  372.                     Meeter_Kill[playerid] = Meeters[playerid];
  373.                     Meeters_BTWDeer[playerid] = SetTimerEx("Detect_M", 1000, true, "i", playerid);
  374.  
  375.                     if(Meeter_Kill[playerid] >= 20) {
  376.                         Shoot_Deer[playerid] = 1;
  377.                         new mesaj[256];
  378.                         MoveObject(Hunter_Deer[playerid],  2406.97729, -403.46811, 72.17617, 3.5, 90.00000, 0.00000, 0.00000);
  379.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Ai omorat o caprioara de la distanta de {1e90ff}%d{FFFFFF}m. Du-te si jupoaiei pielea de pe ea apasand CTRL. ", Meeter_Kill[playerid]);
  380.                         SendClientMessage(playerid, -1, mesaj);
  381.                         Deep_Deer[playerid] = 1;
  382.                     }else {
  383.                         new mesaj[256];
  384.                         DestroyObject(Hunter_Deer[playerid]);
  385.                         format(mesaj, sizeof(mesaj), "{1e90ff}(JOB): {FFFFFF}Deoarace ai tras de la o distanta de {1e90ff}%d{FFFFFF}m, caprioara s-a speriat si a fugit. ", Meeter_Kill[playerid]);
  386.                         SendClientMessage(playerid, -1, mesaj);
  387.                         DisablePlayerCheckpoint(playerid);
  388.                         SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  389.                     }
  390.                 }
  391.             }
  392.         }
  393.     }
  394.  
  395.     return 0;
  396. }
  397.  
  398. public OnPlayerEnterCheckpoint(playerid) {
  399.  
  400.     DisablePlayerCheckpoint(playerid);
  401.  
  402.     return 1;
  403. }
  404.  
  405. public OnPlayerPickUpPickup(playerid, pickupid) {
  406.  
  407.     return 1;
  408. }
  409.  
  410.  
  411. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  412. {
  413.    
  414.     return 0;
  415. }
  416.  
  417.  
  418. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
  419.  
  420.     if(vehicleid == Car_Job[playerid]) {
  421.         KillTimer(timer_Car[playerid]);
  422.         Seconds_timer[playerid] = 0;
  423.         //SendClientMessage(playerid, ATENTIE, "* backup");
  424.     }
  425.  
  426.     return 1;
  427. }
  428.  
  429. public OnPlayerExitVehicle(playerid, vehicleid) {
  430.  
  431.     if(vehicleid == Car_Job[playerid]) {
  432.         timer_Car[playerid] = SetTimerEx("Detectare_Intrare", 1000, true, "i", playerid);
  433.         Seconds_timer[playerid] = 0;
  434.         SendClientMessage(playerid, ATENTIE, "* Ai la dispozitie 120secunde pentru a te intoarce in vehiculul de JOB.");
  435.     }
  436.  
  437.     return 1;
  438. }
  439.  
  440.  
  441. //==============================================================================
  442.  
  443. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
  444.    #define PRESSED(%0) \
  445.      (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  446.  
  447.      if(PRESSED(KEY_WALK)) {
  448.         if(Deep_Deer[playerid] == 1) {
  449.             if(IsPlayerInRangeOfPoint(playerid, 3.5, 2046.7698, -799.4532, 126.7188) && Deer[playerid] == 1) {
  450.                 TogglePlayerControllable(playerid, 0);
  451.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  452.                 Deep_Deer[playerid] = 0;
  453.                 KillTimer(Meeters_BTWDeer[playerid]);
  454.                 Shoot_Deer[playerid] = 0;
  455.                 SetTimer("Done_Deer", 3500, false);
  456.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 2021.1818, -494.0207, 76.1904) && Deer[playerid] == 2) {
  457.                 TogglePlayerControllable(playerid, 0);
  458.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  459.                 Deep_Deer[playerid] = 0;
  460.                 KillTimer(Meeters_BTWDeer[playerid]);
  461.                 Shoot_Deer[playerid] = 0;
  462.                 SetTimer("Done_Deer", 3500, false);
  463.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 1632.5769, -599.7444, 61.8233) && Deer[playerid] == 3) {
  464.                 TogglePlayerControllable(playerid, 0);
  465.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  466.                 Deep_Deer[playerid] = 0;
  467.                 KillTimer(Meeters_BTWDeer[playerid]);
  468.                 Shoot_Deer[playerid] = 0;
  469.                 SetTimer("Done_Deer", 3500, false);
  470.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 1741.4386, -979.5817, 36.6115) && Deer[playerid] == 4) {
  471.                 TogglePlayerControllable(playerid, 0);
  472.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  473.                 Deep_Deer[playerid] = 0;
  474.                 KillTimer(Meeters_BTWDeer[playerid]);
  475.                 Shoot_Deer[playerid] = 0;
  476.                 SetTimer("Done_Deer", 3500, false);
  477.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 2553.6780, -963.4338, 81.6685) && Deer[playerid] == 5) {
  478.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  479.                 TogglePlayerControllable(playerid, 0);
  480.                 Deep_Deer[playerid] = 0;
  481.                 KillTimer(Meeters_BTWDeer[playerid]);
  482.                 Shoot_Deer[playerid] = 0;
  483.                 SetTimer("Done_Deer", 3500, false);
  484.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 2637.4963, -380.2195, 57.9261) && Deer[playerid] == 6) {
  485.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  486.                 TogglePlayerControllable(playerid, 0);
  487.                 Deep_Deer[playerid] = 0;
  488.                 KillTimer(Meeters_BTWDeer[playerid]);
  489.                 Shoot_Deer[playerid] = 0;
  490.                 SetTimer("Done_Deer", 3500, false);
  491.             }else if(IsPlayerInRangeOfPoint(playerid, 3.5, 2406.9773, -403.4681, 72.1762) && Deer[playerid] == 7) {
  492.                 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 1, 1, 1, 1, 1, 0);
  493.                 TogglePlayerControllable(playerid, 0);
  494.                 Deep_Deer[playerid] = 0;
  495.                 KillTimer(Meeters_BTWDeer[playerid]);
  496.                 Shoot_Deer[playerid] = 0;
  497.                 SetTimer("Done_Deer", 3500, false);
  498.             }
  499.          }
  500.      }
  501.  
  502.    
  503. }
  504. //================================[COMENZI CMD]=====================================
  505.  
  506.  
  507. CMD:getjob(playerid, params[]) {
  508.     if(!IsPlayerInRangeOfPoint(playerid, 6.0, 2355.0962, -658.8605, 128.0284))  return 1;
  509.     if(JOB[playerid] != 0)  return SendClientMessage(playerid, ATENTIE, "Eroare: Deja ai un job. Tasteaza [/quitjob]");
  510.  
  511.     JOB[playerid] = 1;
  512.     inJOB[playerid] = 0;
  513.     SendClientMessage(playerid, -1, "{1E90FF} Te-ai angajat la jobul Hunter. Pentru a incepe lucrul tasteaza [/work]. ");
  514.  
  515.     return 1;
  516. }
  517.  
  518. CMD:work(playerid, params[]) {
  519.     if(JOB[playerid] == 1) {
  520.         if(!IsPlayerInRangeOfPoint(playerid, 1.0, 2351.7666, -658.1649, 128.0146)) {
  521.             if(inJOB[playerid] == 1) return 1;
  522.             else {
  523.                 SendClientMessage(playerid, ATENTIE, "* Trebuie sa fii la locul de WORK. Urmeaza CP-ul de pe harta! ");
  524.                 SetPlayerCheckpoint(playerid, 2351.7666, -658.1649, 128.0146, 3.5);
  525.             }
  526.         }else {
  527.             if(inJOB[playerid] == 1)
  528.                  SendClientMessage(playerid, ATENTIE, "Eroare: Deja muncesti! ");
  529.             else {
  530.                 inJOB[playerid] = 1;
  531.                 new rand = random(3);
  532.                 switch(rand) {
  533.                     case 1: {
  534.                         Car_Job[playerid] = CreateVehicle(505, 2343.4946, -655.7953, 128.8901, -180.5998, 225, 142, 100);
  535.                     }
  536.                     case 2: {
  537.                         Car_Job[playerid] = CreateVehicle(505, 2343.9153, -647.9285, 128.8901, 1.5600, 120, 131, 100);
  538.                     }
  539.                     default: Car_Job[playerid] = CreateVehicle(505, 2360.3293, -648.1801, 128.8901, 1.5600, 162, 215, 100);
  540.                 }
  541.                 GivePlayerWeapon(playerid, 33, 99999);
  542.                 PutPlayerInVehicle(playerid, Car_Job[playerid], 0);
  543.                 Deep_Deer[playerid] = 0;
  544.                 Shoot_Deer[playerid] = 0;
  545.  
  546.                 SetTimerEx("Next_Deer", 1000, false, "i", playerid);
  547.             }
  548.         }
  549.     }
  550.  
  551.     return 1;
  552. }
  553.  
  554. CMD:job(playerid, params[]) {
  555.     SetPlayerPos(playerid, 2351.7666, -658.1649, 128.0146);
  556.  
  557.     return 1;
  558. }
RAW Paste Data