SHARE
TWEET

Lumberjack V2

JaanKukin Apr 25th, 2014 1,227 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Lumberjack v2 script by !Pumpkin
  2.  
  3.  
  4.  
  5. #include <a_samp>
  6.  
  7. #define COLOR_GREY 0xAFAFAFAA
  8.  
  9. new Text:Textdraw0;
  10. new Text:Textdraw1;
  11. new Text:Textdraw2;
  12. new Text:Textdraw3;
  13.  
  14. new tree;
  15. new tree1;
  16. new tree2;
  17. new tree3;
  18. new tree4;
  19. new tree5;
  20. new tree6;
  21. new tree7;
  22. new tree8;
  23.  
  24. new saw;
  25. new saw1;
  26. new saw2;
  27.  
  28. new splittree;
  29. new splittree1;
  30. new splittree2;
  31. new splittree3;
  32. new splittree4;
  33. new splittree5;
  34. new splittree6;
  35. new splittree7;
  36. new splittree8;
  37.  
  38. forward rebuildtime(playerid);
  39. forward rebuildtime1(playerid);
  40. forward rebuildtime2(playerid);
  41. forward rebuildtime3(playerid);
  42. forward rebuildtime4(playerid);
  43. forward rebuildtime5(playerid);
  44. forward rebuildtime6(playerid);
  45. forward rebuildtime7(playerid);
  46. forward rebuildtime8(playerid);
  47.  
  48. forward sawspawn(playerid);
  49. forward sawspawn1(playerid);
  50. forward sawspawn2(playerid);
  51.  
  52. forward HideTextdraw0(playerid);
  53. forward HideTextdraw3(playerid);
  54.  
  55. forward removetree(playerid ,objectid);
  56. forward removetree1(playerid);
  57. forward removetree2(playerid);
  58. forward removetree3(playerid);
  59. forward removetree4(playerid);
  60. forward removetree5(playerid);
  61. forward removetree6(playerid);
  62. forward removetree7(playerid);
  63. forward removetree8(playerid);
  64.  
  65. forward doublecut(playerid);
  66. forward doublecut1(playerid);
  67. forward doublecut2(playerid);
  68. forward doublecut3(playerid);
  69. forward doublecut4(playerid);
  70. forward doublecut5(playerid);
  71. forward doublecut6(playerid);
  72. forward doublecut7(playerid);
  73. forward doublecut8(playerid);
  74.  
  75. forward treemove(playerid);
  76. forward treemove1(playerid);
  77. forward treemove2(playerid);
  78. forward treemove3(playerid);
  79. forward treemove4(playerid);
  80. forward treemove5(playerid);
  81. forward treemove6(playerid);
  82. forward treemove7(playerid);
  83. forward treemove8(playerid);
  84.  
  85. public OnFilterScriptInit()
  86. {
  87.         Create3DTextLabel("Type /startcuting at the nearby tree to cut it down", 0x008080FF, -1207.8995,-1387.3682,118.8217, 40.0, 0, 0);
  88.         Create3DTextLabel("Type /lumber here to change into safety gear", 0x008080FF, -1166.2971,-1402.2649,126.2859, 40.0, 0, 0);
  89.         Create3DTextLabel("Type /picksaw to pickup chainsaw", 0x008080FF, -1168.5690,-1406.7262,126.2859, 40.0, 0, 0);
  90.         tree = CreateObject(654,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (1)
  91.         tree1 = CreateObject(654,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (2)
  92.         tree2 = CreateObject(654,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (3)
  93.         tree3 = CreateObject(654,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (4)
  94.         tree4 = CreateObject(654,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (5)
  95.         tree5 = CreateObject(654,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (6)
  96.         tree6 = CreateObject(654,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (7)
  97.         tree7 = CreateObject(654,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (8)
  98.         tree8 = CreateObject(654,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (9)
  99.         CreateObject(18259,-1169.7000000,-1400.6000000,125.2000000,0.0000000,0.0000000,0.0000000); //object(logcabinn01) (1)
  100.         CreateObject(2991,-1167.1000000,-1408.4000000,125.7000000,0.0000000,0.0000000,0.0000000); //object(imy_bbox) (1)
  101.         CreateObject(2200,-1165.0000000,-1401.6000000,125.3000000,0.0000000,0.0000000,272.0000000); //object(med_office5_unit_1) (1)
  102.         CreateObject(3785,-1169.8000000,-1399.5000000,128.3999900,359.8610000,91.9950000,6.0020000); //object(bulkheadlight) (1)
  103.         saw = CreateObject(341,-1168.7000000,-1407.7000000,126.6000000,0.0000000,0.0000000,0.0000000); //object(1)
  104.         saw1 = CreateObject(341, -1167.7, -1407.5, 126.6, 0, 0, 0);
  105.         saw2 = CreateObject(341, -1166.4, -1407.5, 126.6, 0, 0, 0);
  106.        
  107.         Textdraw0 = TextDrawCreate(386.000000,370.000000,"Cuting....please wait");
  108.         Textdraw1 = TextDrawCreate(432.000000,373.000000,"Success!");
  109.         TextDrawAlignment(Textdraw0,0);
  110.         TextDrawAlignment(Textdraw1,0);
  111.         TextDrawBackgroundColor(Textdraw0,0x000000ff);
  112.         TextDrawBackgroundColor(Textdraw1,0x000000ff);
  113.         TextDrawFont(Textdraw0,0);
  114.         TextDrawLetterSize(Textdraw0,1.000000,5.399999);
  115.         TextDrawFont(Textdraw1,3);
  116.         TextDrawLetterSize(Textdraw1,1.000000,6.000000);
  117.         TextDrawColor(Textdraw0,0xff0000ff);
  118.         TextDrawColor(Textdraw1,0x00ff00ff);
  119.         TextDrawSetOutline(Textdraw0,1);
  120.         TextDrawSetOutline(Textdraw1,1);
  121.         TextDrawSetProportional(Textdraw0,1);
  122.         TextDrawSetProportional(Textdraw1,1);
  123.         TextDrawSetShadow(Textdraw0,1);
  124.         TextDrawSetShadow(Textdraw1,1);
  125.        
  126.         Textdraw2 = TextDrawCreate(371.000000,401.000000,"Spliting....please wait");
  127.         Textdraw3 = TextDrawCreate(461.000000,371.000000,"Success");
  128.         TextDrawAlignment(Textdraw2,0);
  129.         TextDrawAlignment(Textdraw3,0);
  130.         TextDrawBackgroundColor(Textdraw2,0x000000ff);
  131.         TextDrawBackgroundColor(Textdraw3,0x000000ff);
  132.         TextDrawFont(Textdraw2,0);
  133.         TextDrawLetterSize(Textdraw2,1.000000,4.000000);
  134.         TextDrawFont(Textdraw3,3);
  135.         TextDrawLetterSize(Textdraw3,1.000000,5.000000);
  136.         TextDrawColor(Textdraw2,0xffff00cc);
  137.         TextDrawColor(Textdraw3,0x00ff00ff);
  138.         TextDrawSetOutline(Textdraw2,1);
  139.         TextDrawSetOutline(Textdraw3,1);
  140.         TextDrawSetProportional(Textdraw2,1);
  141.         TextDrawSetProportional(Textdraw3,1);
  142.         TextDrawSetShadow(Textdraw2,1);
  143.         TextDrawSetShadow(Textdraw3,1);
  144.         return 1;
  145. }
  146.  
  147. public OnFilterScriptExit()
  148. {
  149.         return 1;
  150. }
  151.  
  152. public OnPlayerCommandText(playerid, cmdtext[])
  153. {
  154.         new index, cmd[20];
  155.         cmd = strtok(cmdtext, index);
  156.        
  157.         if(!strcmp(cmdtext, "/langile"))
  158.      {
  159.         SetPlayerPos(playerid, -1168.5632,-1407.0413,126.2859);
  160.         return 1;
  161.      }
  162.  
  163.  
  164.         if(strcmp(cmd, "/picksaw", true) == 0)
  165.         {
  166.         if(IsPlayerNearObject(playerid,saw, 0.8))
  167.         {
  168.         if(GetPlayerSkin(playerid) == 260)
  169.         {
  170.         SendClientMessage(playerid, 0x9EC73DAA, "You picked up a chainsaw");
  171.         //ApplyAnimation(playerid,"BAR","Barserve_order",4.0,1,0,0,1,0);
  172.         GivePlayerWeapon(playerid, 9, 1);
  173.         RemoveBuildingForPlayer(playerid, 341,-1168.7000000,-1407.7000000,126.6000000, 0.0);
  174.         SetTimer("sawspawn", 3500, false);
  175.         }
  176.         }
  177.         if(IsPlayerNearObject(playerid,saw1, 0.8))
  178.         {
  179.         if(GetPlayerSkin(playerid) == 260)
  180.         {
  181.         SendClientMessage(playerid, 0x9EC73DAA, "You picked up a chainsaw");
  182.         //ApplyAnimation(playerid,"BAR","Barserve_order",4.0,1,0,0,1,0);
  183.         RemoveBuildingForPlayer(playerid, 341,-1167.7, -1407.5, 126.6, 0.0);
  184.         GivePlayerWeapon(playerid, 9, 1);
  185.         SetTimer("sawspawn1", 35000, false);
  186.         }
  187.         }
  188.         if(IsPlayerNearObject(playerid,saw2, 0.8))
  189.         {
  190.         if(GetPlayerSkin(playerid) == 260)
  191.         {
  192.         SendClientMessage(playerid, 0x9EC73DAA, "You picked up a chainsaw");
  193.         //ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
  194.         GivePlayerWeapon(playerid, 9, 1);
  195.         RemoveBuildingForPlayer(playerid, 341,-1166.4, -1407.5, 126.6, 0.0);
  196.         SetTimer("sawspawn2", 35000, false);
  197.         }
  198.         }
  199.         else if(GetPlayerSkin(playerid) == 0)
  200.         {
  201.         SendClientMessage(playerid, 0xAA3333AA, "You need to wear safety gear beore working with saw.");
  202.         SendClientMessage(playerid, 0xAA3333AA, "You also need to be near a pickable saw.");
  203.  }
  204.         return 1;
  205.         }
  206.        
  207.         if(strcmp(cmdtext, "/lumber", true) == 0)
  208.     {
  209.         if(IsPlayerInRangeOfPoint(playerid, 2,-1165.0000000,-1401.6000000,125.3000000))
  210.         {
  211.                 //ApplyAnimation(playerid,"CLOTHES","CLO_Pose_Out",4.1,1,0,1,1,0);
  212.         // Set the player's skin to ID 277, which is a fireman.
  213.         SetPlayerSkin(playerid, 260);
  214.                 }
  215.         else
  216.         {
  217.         SendClientMessage(playerid, 0xAA3333AA, "You cant change to safety outfit here.");
  218.         }
  219.         return 1;
  220.         }
  221.  
  222.         if(strcmp(cmd, "/splitcut", true) == 0)
  223.         {
  224.         if(GetPlayerWeapon(playerid) == 9)
  225.     {
  226.         if(IsPlayerNearObject(playerid,splittree, 3.0))
  227.         {
  228.         TogglePlayerControllable(playerid,0);
  229.         TextDrawShowForPlayer(playerid, Textdraw2);
  230.         SetTimer("doublecut", 15000, false);
  231.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  232.         }
  233.         if(IsPlayerNearObject(playerid,splittree1, 3.0))
  234.         {
  235.         TogglePlayerControllable(playerid,0);
  236.         TextDrawShowForPlayer(playerid, Textdraw2);
  237.         SetTimer("doublecut1", 15000, false);
  238.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  239.         }
  240.         if(IsPlayerNearObject(playerid,splittree2, 3.0))
  241.         {
  242.         TogglePlayerControllable(playerid,0);
  243.         TextDrawShowForPlayer(playerid, Textdraw2);
  244.         SetTimer("doublecut2", 15000, false);
  245.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  246.         }
  247.         if(IsPlayerNearObject(playerid,splittree3, 3.0))
  248.         {
  249.         TogglePlayerControllable(playerid,0);
  250.         TextDrawShowForPlayer(playerid, Textdraw2);
  251.         SetTimer("doublecut3", 15000, false);
  252.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  253.         }
  254.         if(IsPlayerNearObject(playerid,splittree4, 3.0))
  255.         {
  256.         TogglePlayerControllable(playerid,0);
  257.         TextDrawShowForPlayer(playerid, Textdraw2);
  258.         SetTimer("doublecut4", 15000, false);
  259.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  260.         }
  261.         if(IsPlayerNearObject(playerid,splittree5, 3.0))
  262.         {
  263.         TogglePlayerControllable(playerid,0);
  264.         TextDrawShowForPlayer(playerid, Textdraw2);
  265.         SetTimer("doublecut5", 15000, false);
  266.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  267.         }
  268.         if(IsPlayerNearObject(playerid,splittree6, 3.0))
  269.         {
  270.         TogglePlayerControllable(playerid,0);
  271.         TextDrawShowForPlayer(playerid, Textdraw2);
  272.         SetTimer("doublecut6", 15000, false);
  273.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  274.         }
  275.         if(IsPlayerNearObject(playerid,splittree7, 3.0))
  276.         {
  277.         TogglePlayerControllable(playerid,0);
  278.         TextDrawShowForPlayer(playerid, Textdraw2);
  279.         SetTimer("doublecut7", 15000, false);
  280.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  281.         }
  282.         if(IsPlayerNearObject(playerid,splittree8, 3.0))
  283.         {
  284.         TogglePlayerControllable(playerid,0);
  285.         TextDrawShowForPlayer(playerid, Textdraw2);
  286.         SetTimer("doublecut8", 15000, false);
  287.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  288.         }
  289.         return 1;
  290.         }
  291.         else if(GetPlayerWeapon(playerid) >= 0)
  292.         {
  293.         SendClientMessage(playerid, 0xAA3333AA, "You need a chainsaw for this!");
  294.         }
  295.         return 1;
  296.         }
  297.        
  298.         if(strcmp(cmd, "/startcuting", true) == 0)
  299.         {
  300.         if(GetPlayerWeapon(playerid) == 9)
  301.     {
  302.         if(IsPlayerNearObject(playerid,tree, 3.0))
  303.         {
  304.         TextDrawShowForPlayer(playerid, Textdraw0);
  305.         TogglePlayerControllable(playerid,0);
  306.         SetTimer("rebuildtime", 150000, false);
  307.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  308.         SetTimer("removetree", 35000, false);
  309.         SetTimer("treemove", 32500, false);
  310.         /*RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1378.5000000,117.8000000, 0.0);
  311.         CreateObject(831,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);*/
  312.         }
  313.         if(IsPlayerNearObject(playerid,tree1, 3.0))
  314.         {
  315.         TogglePlayerControllable(playerid,0);
  316.         TextDrawShowForPlayer(playerid, Textdraw0);
  317.         SetTimer("rebuildtime1", 150000, false);
  318.         ////GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  319.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  320.         SetTimer("removetree1", 35000, false);
  321.         SetTimer("treemove1", 32500, false);
  322.         /*RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1386.7000000,116.30000000, 0.0);
  323.         CreateObject(831,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);*/
  324.         }
  325.         if(IsPlayerNearObject(playerid,tree2, 3.0))
  326.         {
  327.         TogglePlayerControllable(playerid,0);
  328.         TextDrawShowForPlayer(playerid, Textdraw0);
  329.         SetTimer("rebuildtime2", 150000, false);
  330.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  331.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  332.         SetTimer("removetree2", 35000, false);
  333.         SetTimer("treemove2", 32500, false);
  334.         /*RemoveBuildingForPlayer(playerid, 654,-1235.8000000,-1394.3000000,114.6000000, 0.0);
  335.         CreateObject(831,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);*/
  336.         }
  337.         if(IsPlayerNearObject(playerid,tree3, 3.0))
  338.         {
  339.         TogglePlayerControllable(playerid,0);
  340.         TextDrawShowForPlayer(playerid, Textdraw0);
  341.         SetTimer("rebuildtime3", 150000, false);
  342.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  343.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  344.         SetTimer("removetree3", 35000, false);
  345.         SetTimer("treemove3", 32500, false);
  346.         /*RemoveBuildingForPlayer(playerid, 654,-1229.6000000,-1388.7000000,113.8000000, 0.0);
  347.         CreateObject(831,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);*/
  348.         }
  349.         if(IsPlayerNearObject(playerid,tree4, 3.0))
  350.         {
  351.         TogglePlayerControllable(playerid,0);
  352.         TextDrawShowForPlayer(playerid, Textdraw0);
  353.         SetTimer("rebuildtime4", 150000, false);
  354.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  355.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  356.         SetTimer("removetree4", 35000, false);
  357.         SetTimer("treemove4", 32500, false);
  358.         /*RemoveBuildingForPlayer(playerid, 654,-1232.5000000,-1377.9000000,114.8000000, 0.0);
  359.         CreateObject(831,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);*/
  360.         }
  361.         if(IsPlayerNearObject(playerid,tree5, 3.0))
  362.         {
  363.         TogglePlayerControllable(playerid,0);
  364.         TextDrawShowForPlayer(playerid, Textdraw0);
  365.         SetTimer("rebuildtime5", 150000, false);
  366.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  367.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  368.         SetTimer("removetree5", 35000, false);
  369.         SetTimer("treemove5", 32500, false);
  370.         /*RemoveBuildingForPlayer(playerid, 654,-1220.1000000,-1377.5000000,116.1000000, 0.0);
  371.         CreateObject(831,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);*/
  372.         }
  373.         if(IsPlayerNearObject(playerid,tree6, 3.0))
  374.         {
  375.         TogglePlayerControllable(playerid,0);
  376.         TextDrawShowForPlayer(playerid, Textdraw0);
  377.         SetTimer("rebuildtime6", 150000, false);
  378.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  379.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  380.         SetTimer("removetree6", 35000, false);
  381.         SetTimer("treemove6", 32500, false);
  382.         /*RemoveBuildingForPlayer(playerid, 654,-1216.1000000,-1386.7000000,115.6000000, 0.0);
  383.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);*/
  384.         }
  385.         if(IsPlayerNearObject(playerid,tree7, 3.0))
  386.         {
  387.         TogglePlayerControllable(playerid,0);
  388.         TextDrawShowForPlayer(playerid, Textdraw0);
  389.         SetTimer("rebuildtime7", 150000, false);
  390.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  391.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  392.         SetTimer("removetree7", 35000, false);
  393.         SetTimer("treemove7", 32500, false);
  394. /*      RemoveBuildingForPlayer(playerid, 654,-1210.6000000,-1394.3000000,115.6000000, 0.0);
  395.         CreateObject(831,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);*/
  396.         }
  397.         if(IsPlayerNearObject(playerid,tree8, 3.0))
  398.         {
  399.         TogglePlayerControllable(playerid,0);
  400.         TextDrawShowForPlayer(playerid, Textdraw0);
  401.         SetTimer("rebuildtime8", 150000, false);
  402.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  403.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  404.         SetTimer("removetree8", 35000, false);
  405.         SetTimer("treemove8", 32500, false);
  406. /*      RemoveBuildingForPlayer(playerid, 654,-1222.2000000,-1393.5000000,115.1000000, 0.0);
  407.         CreateObject(831,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);*/
  408.         }
  409.         return 1;
  410.         }
  411.         else if(GetPlayerWeapon(playerid) >= 0)
  412.         {
  413.         SendClientMessage(playerid, 0xAA3333AA, "You need a chainsaw for this!");
  414.         }
  415.         return 1;
  416.         }
  417.         return 0;
  418. }
  419.  
  420.  
  421. public rebuildtime(playerid)
  422. {
  423.         CreateObject(654,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);
  424.         RemoveBuildingForPlayer(playerid, 831,-1238.8000000,-1378.5000000,117.8000000, 0.0);
  425. }
  426.  
  427. public rebuildtime1(playerid)
  428. {
  429.         CreateObject(654,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);
  430.         RemoveBuildingForPlayer(playerid, 831,-1238.8000000,-1386.7000000,116.3000000, 0.0);
  431. }
  432.  
  433. public rebuildtime2(playerid)
  434. {
  435.         CreateObject(654,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);
  436.         RemoveBuildingForPlayer(playerid, 831,-1235.8000000,-1394.3000000,114.6000000, 0.0);
  437. }
  438.  
  439. public rebuildtime3(playerid)
  440. {
  441.         CreateObject(654,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);
  442.         RemoveBuildingForPlayer(playerid, 831,-1229.6000000,-1388.7000000,113.8000000, 0.0);
  443. }
  444.  
  445. public rebuildtime4(playerid)
  446. {
  447.         CreateObject(654,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);
  448.         RemoveBuildingForPlayer(playerid, 831,-1232.5000000,-1377.9000000,114.8000000, 0.0);
  449. }
  450.  
  451. public rebuildtime5(playerid)
  452. {
  453.         CreateObject(654,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);
  454.         RemoveBuildingForPlayer(playerid, 831,-1220.1000000,-1377.5000000,116.1000000, 0.0);
  455. }
  456.  
  457. public rebuildtime6(playerid)
  458. {
  459.         RemoveBuildingForPlayer(playerid, 654,-1216.1000000,-1386.7000000,115.6000000, 0.0);
  460.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);
  461. }
  462.  
  463. public rebuildtime7(playerid)
  464. {
  465.         CreateObject(654,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);
  466.         RemoveBuildingForPlayer(playerid, 831,-1210.6000000,-1394.3000000,115.6000000, 0.0);
  467. }
  468.  
  469. public rebuildtime8(playerid)
  470. {
  471.         CreateObject(654,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);
  472.         RemoveBuildingForPlayer(playerid, 831,-1222.2000000,-1393.5000000,115.1000000, 0.0);
  473. }
  474.  
  475. public removetree(playerid ,objectid)
  476. {
  477.         TogglePlayerControllable(playerid,1);
  478.         SetTimer("HideTextdraw0", 3500, false);
  479.         TextDrawHideForPlayer(playerid, Textdraw0);
  480.     ClearAnimations(playerid);
  481.     GivePlayerMoney(playerid, 100);
  482.     DestroyObject(tree);
  483.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  484.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  485.         RemoveBuildingForPlayer(playerid, 654,-1238.7998, -1378.5, 117.8, 0.0);
  486.         splittree = CreateObject(684, -1242.6, -1381.8, 117.8, 5.967, 6.033, 325.371);
  487.         CreateObject(831,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);
  488. }
  489.  
  490. public sawspawn(playerid)
  491. {
  492. saw = CreateObject(341,-1168.7000000,-1407.7000000,126.6000000,0.0000000,0.0000000,0.0000000); //object(1)
  493. }
  494.  
  495. public sawspawn1(playerid)
  496. {
  497. saw1 = CreateObject(341, -1167.7, -1407.5, 126.6, 0, 0, 0);
  498.  
  499. }
  500.  
  501. public sawspawn2(playerid)
  502. {
  503. saw2 = CreateObject(341, -1166.4, -1407.5, 126.6, 0, 0, 0);
  504. }
  505.  
  506. public removetree1(playerid)
  507. {
  508.         TogglePlayerControllable(playerid,1);
  509.         TextDrawHideForPlayer(playerid, Textdraw0);
  510.         TextDrawShowForPlayer(playerid, Textdraw1);
  511.         SetTimer("HideTextdraw0", 3500, false);
  512.     ClearAnimations(playerid);
  513.     DestroyObject(tree1);
  514.     GivePlayerMoney(playerid, 100);
  515.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  516.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  517.         RemoveBuildingForPlayer(playerid, 654,-1238.7998, -1386.7002, 116.3, 0.0);
  518.         splittree1 = CreateObject(684, -1243.2, -1392.6, 116.1, 5.966, 6.031, 325.366);
  519.         CreateObject(831,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);
  520. }
  521.  
  522. public removetree2(playerid)
  523. {
  524.         TogglePlayerControllable(playerid,1);
  525.         TextDrawHideForPlayer(playerid, Textdraw0);
  526.         TextDrawShowForPlayer(playerid, Textdraw1);
  527.         SetTimer("HideTextdraw0", 3500, false);
  528.     ClearAnimations(playerid);
  529.     DestroyObject(tree2);
  530.     GivePlayerMoney(playerid, 100);
  531.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  532.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  533.         RemoveBuildingForPlayer(playerid, 654,-1235.7998, -1394.2998, 114.6, 0.0);
  534.         splittree2 = CreateObject(684, -1239.6, -1397.7, 115.1, 5.966, 6.031, 325.366);
  535.         CreateObject(831,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);
  536. }
  537.  
  538. public removetree3(playerid)
  539. {
  540.         TogglePlayerControllable(playerid,1);
  541.         TextDrawHideForPlayer(playerid, Textdraw0);
  542.         TextDrawShowForPlayer(playerid, Textdraw1);
  543.         SetTimer("HideTextdraw0", 3500, false);
  544.     ClearAnimations(playerid);
  545.     DestroyObject(tree3);
  546.     GivePlayerMoney(playerid, 100);
  547.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  548.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  549.         RemoveBuildingForPlayer(playerid, 654,-1229.5996, -1388.7002, 113.8, 0.0);
  550.         splittree3 = CreateObject(684, -1227.5, -1393, 116.3, 5.94, 8.042, 31.157);
  551.         CreateObject(831,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);
  552. }
  553.  
  554. public removetree4(playerid)
  555. {
  556.         TogglePlayerControllable(playerid,1);
  557.         TextDrawHideForPlayer(playerid, Textdraw0);
  558.         TextDrawShowForPlayer(playerid, Textdraw1);
  559.         SetTimer("HideTextdraw0", 3500, false);
  560.     ClearAnimations(playerid);
  561.     DestroyObject(tree4);
  562.     GivePlayerMoney(playerid, 100);
  563.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  564.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  565.         RemoveBuildingForPlayer(playerid, 654,-1232.5, -1377.9004, 114.8, 0.0);
  566.         splittree4 = CreateObject(684, -1219.8, -1399.4, 115.6, 5.938, 8.042, 31.152);
  567.         CreateObject(831,1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);
  568. }
  569.  
  570. public removetree5(playerid)
  571. {
  572.         TogglePlayerControllable(playerid,1);
  573.         TextDrawHideForPlayer(playerid, Textdraw0);
  574.         TextDrawShowForPlayer(playerid, Textdraw1);
  575.         SetTimer("HideTextdraw0", 3500, false);
  576.     ClearAnimations(playerid);
  577.     DestroyObject(tree5);
  578.     GivePlayerMoney(playerid, 100);
  579.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  580.     SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  581.         RemoveBuildingForPlayer(playerid, 654,-1220.0996, -1377.5, 116.1, 0.0);
  582.         splittree5 = CreateObject(684,-1211.2000000,-1397.6000000,116.6000000,359.9970000,1.9990000,31.9890000); //object(sm_fir_log02) (6)
  583.         CreateObject(831,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);
  584. }
  585.  
  586. public removetree6(playerid)
  587. {
  588.         TogglePlayerControllable(playerid,1);
  589.         TextDrawHideForPlayer(playerid, Textdraw0);
  590.         TextDrawShowForPlayer(playerid, Textdraw1);
  591.         SetTimer("HideTextdraw0", 3500, false);
  592.     ClearAnimations(playerid);
  593.     DestroyObject(tree6);
  594.     GivePlayerMoney(playerid, 100);
  595.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  596.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  597.         RemoveBuildingForPlayer(playerid, 654,-1216.0996, -1386.7002, 115.6, 0.0);
  598.         splittree6 = CreateObject(684, -1216.8, -1375.6, 120.2, 15.996, 0, 299.998);
  599.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);
  600. }
  601.  
  602. public removetree7(playerid)
  603. {
  604.         TogglePlayerControllable(playerid,1);
  605.         TextDrawHideForPlayer(playerid, Textdraw0);
  606.         TextDrawShowForPlayer(playerid, Textdraw1);
  607.         SetTimer("HideTextdraw0", 3500, false);
  608.     ClearAnimations(playerid);
  609.     DestroyObject(tree7);
  610.     GivePlayerMoney(playerid, 100);
  611.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  612.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  613.         RemoveBuildingForPlayer(playerid, 654,-1210.5996, -1394.2998, 115.6, 0.0);
  614.         splittree7 = CreateObject(684, -1206.7998, -1392.7002, 118.3, 15.996, 0, 299.998); // Ă•IGE!!!
  615.         CreateObject(831,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);
  616. }
  617.  
  618. public removetree8(playerid)
  619. {
  620.         TogglePlayerControllable(playerid,1);
  621.         TextDrawHideForPlayer(playerid, Textdraw0);
  622.         TextDrawShowForPlayer(playerid, Textdraw1);
  623.         SetTimer("HideTextdraw0", 3500, false);
  624.     ClearAnimations(playerid);
  625.     DestroyObject(tree8);
  626.     GivePlayerMoney(playerid, 100);
  627.     SendClientMessage(playerid, 0x00FF00FF, "100$ earned.");
  628.         SendClientMessage(playerid, 0xDABB3EAA, "TIP:Type /splitcut to split the fallen tree.");
  629.         RemoveBuildingForPlayer(playerid, 654,-1222.2002, -1393.5, 115.1, 0.0);
  630.         splittree8 = CreateObject(684, -1212.2002, -1385, 118.1, 15.991, 0, 299.993);
  631.         CreateObject(831,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);
  632. }
  633.  
  634. public doublecut(playerid)
  635. {
  636.         TogglePlayerControllable(playerid,1);
  637.         TextDrawHideForPlayer(playerid, Textdraw2);
  638.         TextDrawShowForPlayer(playerid, Textdraw3);
  639.         SetTimer("HideTextdraw3", 3500, false);
  640.     ClearAnimations(playerid);
  641.     GivePlayerMoney(playerid, 75);
  642.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  643.         RemoveBuildingForPlayer(playerid, 684,-1242.6000000,-1381.8000000,117.8000000, 0.0);
  644. }
  645.  
  646. public doublecut1(playerid)
  647. {
  648.         TogglePlayerControllable(playerid,1);
  649.         TextDrawHideForPlayer(playerid, Textdraw2);
  650.         TextDrawShowForPlayer(playerid, Textdraw3);
  651.         SetTimer("HideTextdraw3", 3500, false);
  652.     ClearAnimations(playerid);
  653.     GivePlayerMoney(playerid, 75);
  654.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  655.         RemoveBuildingForPlayer(playerid, 684,-1243.2000000,-1392.6000000,116.1000000, 0.0);
  656. }
  657.  
  658. public doublecut2(playerid)
  659. {
  660.         TogglePlayerControllable(playerid,1);
  661.         SetTimer("HideTextdraw3", 3500, false);
  662.         TextDrawHideForPlayer(playerid, Textdraw2);
  663.         TextDrawShowForPlayer(playerid, Textdraw3);
  664.     ClearAnimations(playerid);
  665.     GivePlayerMoney(playerid, 75);
  666.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  667.         RemoveBuildingForPlayer(playerid, 684,-1239.6000000,-1397.7000000,115.1000000, 0.0);
  668. }
  669.  
  670. public doublecut3(playerid)
  671. {
  672.         TogglePlayerControllable(playerid,1);
  673.         SetTimer("HideTextdraw3", 3500, false);
  674.         TextDrawHideForPlayer(playerid, Textdraw2);
  675.         TextDrawShowForPlayer(playerid, Textdraw3);
  676.     ClearAnimations(playerid);
  677.     GivePlayerMoney(playerid, 75);
  678.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  679.         RemoveBuildingForPlayer(playerid, 684,-1227.5000000,-1393.0000000,116.3000000, 0.0);
  680. }
  681.  
  682. public doublecut4(playerid)
  683. {
  684.         TogglePlayerControllable(playerid,1);
  685.         SetTimer("HideTextdraw3", 3500, false);
  686.         TextDrawHideForPlayer(playerid, Textdraw2);
  687.         TextDrawShowForPlayer(playerid, Textdraw3);
  688.     ClearAnimations(playerid);
  689.     GivePlayerMoney(playerid, 75);
  690.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  691.         RemoveBuildingForPlayer(playerid, 684,-1219.8000000,-1399.4000000,115.6000000, 0.0);
  692. }
  693.  
  694. public doublecut5(playerid)
  695. {
  696.         TogglePlayerControllable(playerid,1);
  697.         SetTimer("HideTextdraw3", 3500, false);
  698.         TextDrawHideForPlayer(playerid, Textdraw2);
  699.         TextDrawShowForPlayer(playerid, Textdraw3);
  700.     ClearAnimations(playerid);
  701.     GivePlayerMoney(playerid, 75);
  702.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  703.         RemoveBuildingForPlayer(playerid, 684,-1211.2000000,-1397.6000000,116.6000000, 0.0);
  704. }
  705.  
  706. public doublecut6(playerid)
  707. {
  708.         TogglePlayerControllable(playerid,1);
  709.         SetTimer("HideTextdraw3", 3500, false);
  710.         TextDrawHideForPlayer(playerid, Textdraw2);
  711.         TextDrawShowForPlayer(playerid, Textdraw3);
  712.     ClearAnimations(playerid);
  713.     GivePlayerMoney(playerid, 75);
  714.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  715.         RemoveBuildingForPlayer(playerid, 684,-1211.9000000,-1387.4000000,117.3000000, 0.0);
  716. }
  717.  
  718. public doublecut7(playerid)
  719. {
  720.         TogglePlayerControllable(playerid,1);
  721.         SetTimer("HideTextdraw3", 3500, false);
  722.         TextDrawHideForPlayer(playerid, Textdraw2);
  723.         TextDrawShowForPlayer(playerid, Textdraw3);
  724.     ClearAnimations(playerid);
  725.     GivePlayerMoney(playerid, 75);
  726.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  727.         RemoveBuildingForPlayer(playerid, 684,-1215.6000000,-1376.3000000,120.1000000, 0.0);
  728. }
  729.  
  730. public doublecut8(playerid)
  731. {
  732.         TogglePlayerControllable(playerid,1);
  733.         SetTimer("HideTextdraw3", 3500, false);
  734.         TextDrawHideForPlayer(playerid, Textdraw2);
  735.         TextDrawShowForPlayer(playerid, Textdraw3);
  736.     ClearAnimations(playerid);
  737.     GivePlayerMoney(playerid, 75);
  738.     SendClientMessage(playerid, 0x00FF00FF, "75$ earned.");
  739.         RemoveBuildingForPlayer(playerid, 684,-1228.0000000,-1377.5000000,118.8000000, 0.0);
  740. }
  741.  
  742. public treemove(playerid)
  743. {
  744.         MoveObject(tree, -1238.7998000,-1378.5000000,117.8000000,0.005,0.0000000,274.0000000,40.0000000);
  745. }
  746.  
  747. public treemove1(playerid)
  748. {
  749.         MoveObject(tree1, -1238.7998, -1386.7002, 116.3, 0.005, 0, 268, 44);
  750. }
  751.  
  752. public treemove2(playerid)
  753. {
  754.         MoveObject(tree2, -1235.7998, -1394.2998, 114.6, 0.005,0, 268, 50);
  755. }
  756.  
  757. public treemove3(playerid)
  758. {
  759.         MoveObject(tree3, -1229.5996, -1388.7002, 113.8, 0.005,0, 92, 298);
  760. }
  761.  
  762. public treemove4(playerid)
  763. {
  764.         MoveObject(tree4, -1232.5, -1377.9004, 114.8, 0.005,0, 76, 0);
  765. }
  766.  
  767. public treemove5(playerid)
  768. {
  769.         MoveObject(tree5, -1220.0996, -1377.5, 116.1, 0.005,0, 54, 42);
  770. }
  771.  
  772. public treemove6(playerid)
  773. {
  774.         MoveObject(tree6, -1216.0996, -1386.7002, 115.6, 0.005,0, 88, 0);
  775. }
  776.  
  777. public treemove7(playerid)
  778. {
  779.         MoveObject(tree7, -1210.5996, -1394.2998, 115.6, 0.005,0, 68, 28);
  780. }
  781.  
  782. public treemove8(playerid)
  783. {
  784.         MoveObject(tree8, -1222.2002, -1393.5, 115.1, 0.005,0, 98, 0);
  785. }
  786.  
  787. public HideTextdraw0(playerid)
  788. {
  789. TextDrawHideForPlayer(playerid, Textdraw1);
  790.  
  791. }
  792. public HideTextdraw3(playerid)
  793. {
  794. TextDrawHideForPlayer(playerid, Textdraw3);
  795.  
  796. }
  797.  
  798.  
  799. strtok(const string[], &index)
  800. {
  801.         new length = strlen(string);
  802.         while ((index < length) && (string[index] <= ' '))
  803.         {
  804.                 index++;
  805.         }
  806.  
  807.         new offset = index;
  808.         new result[20];
  809.         while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  810.         {
  811.                 result[index - offset] = string[index];
  812.                 index++;
  813.         }
  814.         result[index - offset] = EOS;
  815.         return result;
  816. }
  817.  
  818. stock IsPlayerNearObject(playerid, objectid, Float:range)
  819. {
  820.     new Float:X, Float:Y, Float:Z;
  821.     GetObjectPos(objectid, X, Y, Z);
  822.     if(IsPlayerInRangeOfPoint(playerid, range, X, Y, Z))return true;
  823.     return false;
  824. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top