Advertisement
Guest User

Farmer Job [My Second FS][New Style Of Farmer Job - See Pict

a guest
Aug 11th, 2014
2,521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.80 KB | None | 0 0
  1. /*==============================================================================
  2. *                                                                              *
  3. *       -PizzaBoy Job Filterscript By: [Phoenix-]                              *
  4. *           -Yahoo: Mhmmd480@Yahoo.Com                                         *
  5. *               -Skype: Mamad.Venom                                            *
  6. *                                                                              *
  7. ==============================================================================*/
  8. // This Job Is In SF [ -1812.0 , 937.0 , 24.7422 ]
  9. #include <a_samp>
  10. #include <streamer>
  11.  
  12. #define SLOT 1
  13.  
  14. #pragma tabsize 0
  15.  
  16. new FarmerJob[MAX_PLAYERS];
  17. new Wheats[MAX_PLAYERS];
  18. new CheckPoint1;
  19. new CheckPoint2;
  20.  
  21. public OnGameModeInit()
  22. {
  23.     CreateObject(3261, -1439.06335, -1490.83398, 100.77420,   0.00000, 0.00000, 95.00000);
  24.     CreateObject(3261, -1436.05420, -1490.57397, 100.77420,   0.00000, 0.00000, 95.00000);
  25.     CreateObject(1458, -1429.37500, -1528.02844, 100.98650,   0.00000, 0.00000, 0.00000);
  26.     CreateObject(2901, -1429.35974, -1526.50000, 101.27210,   0.00000, 0.00000, 0.00000);
  27.     CreateObject(2901, -1429.35974, -1527.50000, 101.77210,   0.00000, 0.00000, 0.00000);
  28.     CreateObject(2901, -1429.35974, -1528.00000, 101.97210,   0.00000, 0.00000, 0.00000);
  29.     CreateObject(2901, -1429.35974, -1527.00000, 101.57210,   0.00000, 0.00000, 0.00000);
  30.     CreateObject(2237, -1430.24414, -1526.54248, 101.55030,   45.00000, 25.00000, 90.00000);
  31.     CreateObject(3461, -1430.44995, -1527.50000, 102.32000,   0.00000, 0.00000, 0.00000);
  32.     CreateObject(3461, -1428.44995, -1527.48718, 102.32000,   0.00000, 0.00000, 0.00000);
  33.  
  34.     Create3DTextLabel("{FFA500}First {FFFFFF}CheckPoint",-1,-1437.9021,-1490.7566,101.2376, 50.0, 0, 0);
  35.     Create3DTextLabel("{FF4848}Second {FFFFFF}CheckPoint",-1,-1425.7504,-1527.9706,101.3923, 50.0, 0, 0);
  36.    
  37.     CheckPoint1 = CreateDynamicCP(-1437.9021,-1490.7566,101.7376,2,-1,-1,-1,4);
  38.     CheckPoint2 = CreateDynamicCP(-1425.7504,-1527.9706,101.8923,2,-1,-1,-1,4);
  39.  
  40.     print("\n+++++ Farmer Job FilterScript +++++");
  41.     print("**************************************");
  42.     print("*                                    *");
  43.     print("*  -Filterscript By: [Phoenix-]      *");
  44.     print("*    -Yahoo: Mhmmd480@Yahoo.Com      *");
  45.     print("*      -Skype: Mamad.Venom           *");
  46.     print("*                                    *");
  47.     print("**************************************\n");
  48.     return 1;
  49. }
  50.  
  51. public OnPlayerEnterDynamicCP(playerid , checkpointid)
  52. {
  53.     if(checkpointid == CheckPoint1)
  54.     {
  55.         SendClientMessage(playerid,0x81C0C0AA,"{81C0C0}Press{FFFF00} Left Alt");
  56.         return 1;
  57.     }
  58.     if(checkpointid == CheckPoint2)
  59.     {
  60.         new string[128], PName[MAX_PLAYER_NAME];
  61.         GetPlayerName(playerid,PName,sizeof(PName));
  62.         if(FarmerJob[playerid] == 0)
  63.         {
  64.             SendClientMessage(playerid,0xD2691EAA,"You Must First Be In The First CheckPoint And Then Come Here.");
  65.             return 1;
  66.         }
  67.         if(Wheats[playerid] == 9)
  68.         {
  69.             format(string,sizeof(string),"[FARMERJOB] {f06248}%s(%d) {FFFFFF}Has Done His Farmer Job And Recived {8068df}$500 + 1 Score.",PName,playerid);
  70.             SendClientMessageToAll(0x10F441AA,string);
  71.             GivePlayerMoney(playerid,500);
  72.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  73.             Wheats[playerid] =0;
  74.             FarmerJob[playerid] =0;
  75.             RemovePlayerAttachedObject(playerid, 1);
  76.             return 1;
  77.         }
  78.         RemovePlayerAttachedObject(playerid, 1);
  79.         ApplyAnimation(playerid, "PED", "IDLE_tired", 4.0, 1, 0, 0, 0, 5000, 1);
  80.         SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
  81.         FarmerJob[playerid] =0;
  82.         SendClientMessage(playerid,0x33AA33AA,"Goto The First Checkpoint.");
  83.         Wheats[playerid] +=1;
  84.         format(string,sizeof(string),"Wheats~n~~g~%d/10",Wheats[playerid]);
  85.         GameTextForPlayer(playerid,string,3000,5);
  86.         return 1;
  87.     }
  88.     return 1;
  89. }
  90.  
  91. public OnPlayerDisconnect(playerid, reason)
  92. {
  93.     FarmerJob[playerid] =0;
  94.     Wheats[playerid] =0;
  95.     return 1;
  96. }
  97. public OnPlayerDeath(playerid, killerid, reason)
  98. {
  99.     FarmerJob[playerid] =0;
  100.     Wheats[playerid] =0;
  101.     return 1;
  102. }
  103.  
  104. public OnPlayerUpdate(playerid)
  105. {
  106.     if(FarmerJob[playerid] == 1)
  107.     {
  108.         SetPlayerAttachedObject(playerid, 1, 2901, 5, 0.101, -0.0, 0.0, 5.50, 90, 90, 1, 1);
  109.     }
  110.     return 1;
  111. }
  112.  
  113. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  114. {
  115.     if(newkeys == KEY_WALK)
  116.     {
  117.         if(IsPlayerInDynamicCP(playerid , CheckPoint1))
  118.         {
  119.             if(FarmerJob[playerid] == 1)
  120.             {
  121.                 SendClientMessage(playerid,0xD2691EAA,"You Are Done Here. Goto The Second Checkpoint.");
  122.                 return 1;
  123.             }
  124.             SendClientMessage(playerid,0x33AA33AA,"Goto The Second Checkpoint.");
  125.             FarmerJob[playerid] =1;
  126.             SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CUFFED);
  127.             ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 5000, 1);
  128.             return 1;
  129.         }
  130.         return 1;
  131.     }
  132.     return 1;
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement