SHARE
TWEET

Lumberjack script by !Pumpkin

a guest Apr 23rd, 2014 677 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Lumberjack script by !Pumpkin
  2.  
  3.  
  4.  
  5. #include <a_samp>
  6.  
  7. #define COLOR_GREY 0xAFAFAFAA
  8.  
  9. forward rebuildtime(playerid);
  10. forward rebuildtime1(playerid);
  11. forward rebuildtime2(playerid);
  12. forward rebuildtime3(playerid);
  13. forward rebuildtime4(playerid);
  14. forward rebuildtime5(playerid);
  15. forward rebuildtime6(playerid);
  16. forward rebuildtime7(playerid);
  17. forward rebuildtime8(playerid);
  18.  
  19. forward removetree(playerid);
  20. forward removetree1(playerid);
  21. forward removetree2(playerid);
  22. forward removetree3(playerid);
  23. forward removetree4(playerid);
  24. forward removetree5(playerid);
  25. forward removetree6(playerid);
  26. forward removetree7(playerid);
  27. forward removetree8(playerid);
  28.  
  29.  
  30. public OnFilterScriptInit()
  31. {
  32.         Create3DTextLabel("Type /startcuting at the nearby tree to cut it down", 0x008080FF, -1207.8995,-1387.3682,118.8217, 40.0, 0, 0);
  33.         Create3DTextLabel("Type /lumber here to change into safety gear", 0x008080FF, -1166.2971,-1402.2649,126.2859, 40.0, 0, 0);
  34.         Create3DTextLabel("Type /picksaw to pickup chainsaw", 0x008080FF, -1168.5690,-1406.7262,126.2859, 40.0, 0, 0);
  35.         CreateObject(654,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (1)
  36.         CreateObject(654,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (2)
  37.         CreateObject(654,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (3)
  38.         CreateObject(654,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (4)
  39.         CreateObject(654,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (5)
  40.         CreateObject(654,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (6)
  41.         CreateObject(654,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (7)
  42.         CreateObject(654,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (8)
  43.         CreateObject(654,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000); //object(pinetree08) (9)
  44.         CreateObject(18259,-1169.7000000,-1400.6000000,125.2000000,0.0000000,0.0000000,0.0000000); //object(logcabinn01) (1)
  45.         CreateObject(2991,-1167.1000000,-1408.4000000,125.7000000,0.0000000,0.0000000,0.0000000); //object(imy_bbox) (1)
  46.         CreateObject(2200,-1165.0000000,-1401.6000000,125.3000000,0.0000000,0.0000000,272.0000000); //object(med_office5_unit_1) (1)
  47.         CreateObject(3785,-1169.8000000,-1399.5000000,128.3999900,359.8610000,91.9950000,6.0020000); //object(bulkheadlight) (1)
  48.         CreateObject(341,-1168.7000000,-1407.7000000,126.6000000,0.0000000,0.0000000,0.0000000); //object(1)
  49.         return 1;
  50. }
  51.  
  52. public OnFilterScriptExit()
  53. {
  54.         return 1;
  55. }
  56.  
  57. public OnPlayerConnect(playerid)
  58. {
  59.         return 1;
  60. }
  61.  
  62. public OnPlayerDisconnect(playerid, reason)
  63. {
  64.         return 1;
  65. }
  66.  
  67. public OnPlayerSpawn(playerid)
  68. {
  69.         return 1;
  70. }
  71.  
  72. public OnPlayerDeath(playerid, killerid, reason)
  73. {
  74.         return 1;
  75. }
  76.  
  77. public OnVehicleSpawn(vehicleid)
  78. {
  79.         return 1;
  80. }
  81.  
  82. public OnVehicleDeath(vehicleid, killerid)
  83. {
  84.         return 1;
  85. }
  86.  
  87. public OnPlayerText(playerid, text[])
  88. {
  89.         return 1;
  90. }
  91.  
  92. public OnPlayerCommandText(playerid, cmdtext[])
  93. {
  94.         new index, cmd[20];
  95.         cmd = strtok(cmdtext, index);
  96.  
  97.         if (strcmp(cmd, "/startcut2ng", true) == 0)
  98.         {
  99.                 new tmp[20];
  100.                 tmp = strtok(cmdtext, index);
  101.                 if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Usage : /heal <ID>");
  102.                 if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  103.                 SetPlayerHealth(strval(tmp), 100.0);
  104.                 SendClientMessage(strval(tmp), 0x00FF00AA, "You have been healed");
  105.                 SendClientMessage(playerid, 0x00FF00AA, "Player healed");
  106.                 return 1;
  107.         }
  108.        
  109.         if(!strcmp(cmdtext, "/langile"))
  110.      {
  111.         SendClientMessage(playerid, 0xFFFFFFFF, "Hello Player!");
  112.         SetPlayerPos(playerid, -1168.5632,-1407.0413,126.2859);
  113.         return 1;
  114.      }
  115.  
  116.  
  117.         if(strcmp(cmd, "/picksaw", true) == 0)
  118.         {
  119.         if(IsPlayerInRangeOfPoint(playerid, 2, -1168.5632,-1407.0413,126.2859 ))
  120.         {
  121.         if(GetPlayerSkin(playerid) == 260)
  122.         {
  123.         GivePlayerWeapon(playerid, 9, 1);
  124.         RemoveBuildingForPlayer(playerid, 341,-1168.7000000,-1407.7000000,126.6000000, 0.0);
  125.         SendClientMessage(playerid, COLOR_GREY, "* you picked up a chainsaw");
  126.         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
  127.                 }
  128.         else
  129.         {
  130.         SendClientMessage(playerid, COLOR_GREY, "* you need to wear safety gear beore working with saw!");
  131.         }
  132. }
  133.         return 1;
  134.         }
  135.        
  136.         if(strcmp(cmdtext, "/lumber", true) == 0)
  137.     {
  138.         if(IsPlayerInRangeOfPoint(playerid, 2,-1165.0000000,-1401.6000000,125.3000000))
  139.         {
  140.                 ApplyAnimation(playerid,"CLOTHES","CLO_Pose_Out",4.1,1,0,1,1,0);
  141.         // Set the player's skin to ID 277, which is a fireman.
  142.         SetPlayerSkin(playerid, 260);
  143.                 }
  144.         else
  145.         {
  146.         SendClientMessage(playerid, COLOR_GREY, "You cant change to safety outfit here.");
  147.         }
  148.         return 1;
  149.         }
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.         if(strcmp(cmd, "/startcuting", true) == 0)
  157.         {
  158.         if(GetPlayerWeapon(playerid) >= 9)
  159.     {
  160.         if(IsPlayerInRangeOfPoint(playerid, 2,-1238.8000000,-1378.5000000,117.8000000 ))
  161.         {
  162.         //GameTextForPlayer(playerid," ~r~ Cuting....please wait", 5000, 2);
  163.         TogglePlayerControllable(playerid,0);
  164.         SetTimer("rebuildtime", 150000, false);
  165.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  166.         SetTimer("removetree", 35000, false);
  167.         /*RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1378.5000000,117.8000000, 0.0);
  168.         CreateObject(831,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);*/
  169.         }
  170.         if(IsPlayerInRangeOfPoint(playerid, 4,-1238.8000000,-1386.7000000,116.3000000 ))
  171.         {
  172.         TogglePlayerControllable(playerid,0);
  173.         SetTimer("rebuildtime1", 150000, false);
  174.         ////GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  175.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  176.         SetTimer("removetree1", 35000, false);
  177.         /*RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1386.7000000,116.30000000, 0.0);
  178.         CreateObject(831,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);*/
  179.         }
  180.         if(IsPlayerInRangeOfPoint(playerid, 4,-1235.8000000,-1394.3000000,114.6000000 ))
  181.         {
  182.         TogglePlayerControllable(playerid,0);
  183.         SetTimer("rebuildtime2", 150000, false);
  184.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  185.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  186.         SetTimer("removetree2", 35000, false);
  187.         /*RemoveBuildingForPlayer(playerid, 654,-1235.8000000,-1394.3000000,114.6000000, 0.0);
  188.         CreateObject(831,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);*/
  189.         }
  190.         if(IsPlayerInRangeOfPoint(playerid, 4,-1229.6000000,-1388.7000000,113.8000000 ))
  191.         {
  192.         TogglePlayerControllable(playerid,0);
  193.         SetTimer("rebuildtime3", 150000, false);
  194.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  195.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  196.         SetTimer("removetree3", 35000, false);
  197.         /*RemoveBuildingForPlayer(playerid, 654,-1229.6000000,-1388.7000000,113.8000000, 0.0);
  198.         CreateObject(831,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);*/
  199.         }
  200.         if(IsPlayerInRangeOfPoint(playerid, 4,-1232.5000000,-1377.9000000,114.8000000))
  201.         {
  202.         TogglePlayerControllable(playerid,0);
  203.         SetTimer("rebuildtime4", 150000, false);
  204.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  205.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  206.         SetTimer("removetree4", 35000, false);
  207.         /*RemoveBuildingForPlayer(playerid, 654,-1232.5000000,-1377.9000000,114.8000000, 0.0);
  208.         CreateObject(831,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);*/
  209.         }
  210.         if(IsPlayerInRangeOfPoint(playerid, 4,-1220.1000000,-1377.5000000,116.1000000 ))
  211.         {
  212.         TogglePlayerControllable(playerid,0);
  213.         SetTimer("rebuildtime5", 150000, false);
  214.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  215.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  216.         SetTimer("removetree5", 35000, false);
  217.         /*RemoveBuildingForPlayer(playerid, 654,-1220.1000000,-1377.5000000,116.1000000, 0.0);
  218.         CreateObject(831,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);*/
  219.         }
  220.         if(IsPlayerInRangeOfPoint(playerid, 4,-1216.1000000,-1386.7000000,115.6000000))
  221.         {
  222.         TogglePlayerControllable(playerid,0);
  223.         SetTimer("rebuildtime6", 150000, false);
  224.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  225.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  226.         SetTimer("removetree6", 35000, false);
  227.         /*RemoveBuildingForPlayer(playerid, 654,-1216.1000000,-1386.7000000,115.6000000, 0.0);
  228.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);*/
  229.         }
  230.         if(IsPlayerInRangeOfPoint(playerid, 4,-1210.6000000,-1394.3000000,115.6000000))
  231.         {
  232.         TogglePlayerControllable(playerid,0);
  233.         SetTimer("rebuildtime7", 150000, false);
  234.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  235.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  236.         SetTimer("removetree7", 35000, false);
  237. /*      RemoveBuildingForPlayer(playerid, 654,-1210.6000000,-1394.3000000,115.6000000, 0.0);
  238.         CreateObject(831,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);*/
  239.         }
  240.         if(IsPlayerInRangeOfPoint(playerid, 4,-1222.2000000,-1393.5000000,115.1000000))
  241.         {
  242.         TogglePlayerControllable(playerid,0);
  243.         SetTimer("rebuildtime8", 150000, false);
  244.         //GameTextForPlayer(playerid, " ~r~ Cuting....please wait", 500, 2);
  245.         ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,1,0,1,1,0);
  246.         SetTimer("removetree8", 35000, false);
  247. /*      RemoveBuildingForPlayer(playerid, 654,-1222.2000000,-1393.5000000,115.1000000, 0.0);
  248.         CreateObject(831,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);*/
  249.         }
  250.         return 1;
  251.         }
  252.         else if(GetPlayerWeapon(playerid) >= 0)
  253.         {
  254.         SendClientMessage(playerid, COLOR_GREY, "* You need a chainsaw for this!");
  255.         }
  256.         return 1;
  257.         }
  258.         return 0;
  259. }
  260.  
  261. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  262. {
  263.         return 1;
  264. }
  265.  
  266. public OnPlayerExitVehicle(playerid, vehicleid)
  267. {
  268.         return 1;
  269. }
  270.  
  271. public OnPlayerStateChange(playerid, newstate, oldstate)
  272. {
  273.         return 1;
  274. }
  275.  
  276. public OnPlayerEnterCheckpoint(playerid)
  277. {
  278.         return 1;
  279. }
  280.  
  281. public OnPlayerLeaveCheckpoint(playerid)
  282. {
  283.         return 1;
  284. }
  285.  
  286. public OnPlayerEnterRaceCheckpoint(playerid)
  287. {
  288.         return 1;
  289. }
  290.  
  291. public OnPlayerLeaveRaceCheckpoint(playerid)
  292. {
  293.         return 1;
  294. }
  295.  
  296. public OnRconCommand(cmd[])
  297. {
  298.         return 1;
  299. }
  300.  
  301. public OnPlayerRequestSpawn(playerid)
  302. {
  303.         return 1;
  304. }
  305.  
  306. public OnObjectMoved(objectid)
  307. {
  308.         return 1;
  309. }
  310.  
  311. public OnPlayerObjectMoved(playerid, objectid)
  312. {
  313.         return 1;
  314. }
  315.  
  316. public OnPlayerPickUpPickup(playerid, pickupid)
  317. {
  318.         return 1;
  319. }
  320.  
  321. public OnVehicleMod(playerid, vehicleid, componentid)
  322. {
  323.         return 1;
  324. }
  325.  
  326. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  327. {
  328.         return 1;
  329. }
  330.  
  331. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  332. {
  333.         return 1;
  334. }
  335.  
  336. public OnPlayerSelectedMenuRow(playerid, row)
  337. {
  338.         return 1;
  339. }
  340.  
  341. public OnPlayerExitedMenu(playerid)
  342. {
  343.         return 1;
  344. }
  345.  
  346. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  347. {
  348.         return 1;
  349. }
  350.  
  351. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  352. {
  353.         return 1;
  354. }
  355.  
  356. public OnRconLoginAttempt(ip[], password[], success)
  357. {
  358.         return 1;
  359. }
  360.  
  361. public OnPlayerUpdate(playerid)
  362. {
  363.         return 1;
  364. }
  365.  
  366. public OnPlayerStreamIn(playerid, forplayerid)
  367. {
  368.         return 1;
  369. }
  370.  
  371. public OnPlayerStreamOut(playerid, forplayerid)
  372. {
  373.         return 1;
  374. }
  375.  
  376. public OnVehicleStreamIn(vehicleid, forplayerid)
  377. {
  378.         return 1;
  379. }
  380.  
  381. public OnVehicleStreamOut(vehicleid, forplayerid)
  382. {
  383.         return 1;
  384. }
  385.  
  386. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  387. {
  388.         return 1;
  389. }
  390.  
  391. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  392. {
  393.         return 1;
  394. }
  395.  
  396. public rebuildtime(playerid)
  397. {
  398.         CreateObject(654,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);
  399.         RemoveBuildingForPlayer(playerid, 831,-1238.8000000,-1378.5000000,117.8000000, 0.0);
  400. }
  401.  
  402. public rebuildtime1(playerid)
  403. {
  404.         CreateObject(654,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);
  405.         RemoveBuildingForPlayer(playerid, 831,-1238.8000000,-1386.7000000,116.3000000, 0.0);
  406. }
  407.  
  408. public rebuildtime2(playerid)
  409. {
  410.         CreateObject(654,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);
  411.         RemoveBuildingForPlayer(playerid, 831,-1235.8000000,-1394.3000000,114.6000000, 0.0);
  412. }
  413.  
  414. public rebuildtime3(playerid)
  415. {
  416.         CreateObject(654,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);
  417.         RemoveBuildingForPlayer(playerid, 831,-1229.6000000,-1388.7000000,113.8000000, 0.0);
  418. }
  419.  
  420. public rebuildtime4(playerid)
  421. {
  422.         CreateObject(654,-1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);
  423.         RemoveBuildingForPlayer(playerid, 831,-1232.5000000,-1377.9000000,114.8000000, 0.0);
  424. }
  425.  
  426. public rebuildtime5(playerid)
  427. {
  428.         CreateObject(654,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);
  429.         RemoveBuildingForPlayer(playerid, 831,-1220.1000000,-1377.5000000,116.1000000, 0.0);
  430. }
  431.  
  432. public rebuildtime6(playerid)
  433. {
  434.         RemoveBuildingForPlayer(playerid, 654,-1216.1000000,-1386.7000000,115.6000000, 0.0);
  435.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);
  436. }
  437.  
  438. public rebuildtime7(playerid)
  439. {
  440.         CreateObject(654,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);
  441.         RemoveBuildingForPlayer(playerid, 831,-1210.6000000,-1394.3000000,115.6000000, 0.0);
  442. }
  443.  
  444. public rebuildtime8(playerid)
  445. {
  446.         CreateObject(654,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);
  447.         RemoveBuildingForPlayer(playerid, 831,-1222.2000000,-1393.5000000,115.1000000, 0.0);
  448. }
  449.  
  450. public removetree(playerid)
  451. {
  452.         TogglePlayerControllable(playerid,1);
  453.     ClearAnimations(playerid);
  454.     GivePlayerMoney(playerid, 500);
  455.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  456.         RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1378.5000000,117.8000000, 0.0);
  457.         CreateObject(831,-1238.8000000,-1378.5000000,117.8000000,0.0000000,0.0000000,0.0000000);
  458. }
  459.  
  460. public removetree1(playerid)
  461. {
  462.         TogglePlayerControllable(playerid,1);
  463.     ClearAnimations(playerid);
  464.     GivePlayerMoney(playerid, 500);
  465.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  466.         RemoveBuildingForPlayer(playerid, 654,-1238.8000000,-1386.7000000,116.30000000, 0.0);
  467.         CreateObject(831,-1238.8000000,-1386.7000000,116.3000000,0.0000000,0.0000000,0.0000000);
  468. }
  469.  
  470. public removetree2(playerid)
  471. {
  472.         TogglePlayerControllable(playerid,1);
  473.     ClearAnimations(playerid);
  474.     GivePlayerMoney(playerid, 500);
  475.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  476.         RemoveBuildingForPlayer(playerid, 654,-1235.8000000,-1394.3000000,114.6000000, 0.0);
  477.         CreateObject(831,-1235.8000000,-1394.3000000,114.6000000,0.0000000,0.0000000,0.0000000);
  478. }
  479.  
  480. public removetree3(playerid)
  481. {
  482.         TogglePlayerControllable(playerid,1);
  483.     ClearAnimations(playerid);
  484.     GivePlayerMoney(playerid, 500);
  485.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  486.         RemoveBuildingForPlayer(playerid, 654,-1229.6000000,-1388.7000000,113.8000000, 0.0);
  487.         CreateObject(831,-1229.6000000,-1388.7000000,113.8000000,0.0000000,0.0000000,0.0000000);
  488. }
  489.  
  490. public removetree4(playerid)
  491. {
  492.         TogglePlayerControllable(playerid,1);
  493.     ClearAnimations(playerid);
  494.     GivePlayerMoney(playerid, 500);
  495.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  496.         RemoveBuildingForPlayer(playerid, 654,1232.5000000,-1377.9000000,114.8000000, 0.0);
  497.         CreateObject(831,1232.5000000,-1377.9000000,114.8000000,0.0000000,0.0000000,0.0000000);
  498. }
  499.  
  500. public removetree5(playerid)
  501. {
  502.         TogglePlayerControllable(playerid,1);
  503.     ClearAnimations(playerid);
  504.     GivePlayerMoney(playerid, 500);
  505.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  506.         RemoveBuildingForPlayer(playerid, 654,-1220.1000000,-1377.5000000,116.1000000, 0.0);
  507.         CreateObject(831,-1220.1000000,-1377.5000000,116.1000000,0.0000000,0.0000000,0.0000000);
  508. }
  509.  
  510. public removetree6(playerid)
  511. {
  512.         TogglePlayerControllable(playerid,1);
  513.     ClearAnimations(playerid);
  514.     GivePlayerMoney(playerid, 500);
  515.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  516.         RemoveBuildingForPlayer(playerid, 654,-1216.1000000,-1386.7000000,115.6000000, 0.0);
  517.         CreateObject(831,-1216.1000000,-1386.7000000,115.6000000,0.0000000,0.0000000,0.0000000);
  518. }
  519.  
  520. public removetree7(playerid)
  521. {
  522.         TogglePlayerControllable(playerid,1);
  523.     ClearAnimations(playerid);
  524.     GivePlayerMoney(playerid, 500);
  525.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  526.         RemoveBuildingForPlayer(playerid, 654,-1210.6000000,-1394.3000000,115.6000000, 0.0);
  527.         CreateObject(831,-1210.6000000,-1394.3000000,115.6000000,0.0000000,0.0000000,0.0000000);
  528. }
  529.  
  530. public removetree8(playerid)
  531. {
  532.         TogglePlayerControllable(playerid,1);
  533.     ClearAnimations(playerid);
  534.     GivePlayerMoney(playerid, 500);
  535.     SendClientMessage(playerid, 0x00FF00FF, "500$ earned.");
  536.         RemoveBuildingForPlayer(playerid, 654,-1222.2000000,-1393.5000000,115.1000000, 0.0);
  537.         CreateObject(831,-1222.2000000,-1393.5000000,115.1000000,0.0000000,0.0000000,0.0000000);
  538. }
  539.  
  540. strtok(const string[], &index)
  541. {
  542.         new length = strlen(string);
  543.         while ((index < length) && (string[index] <= ' '))
  544.         {
  545.                 index++;
  546.         }
  547.  
  548.         new offset = index;
  549.         new result[20];
  550.         while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  551.         {
  552.                 result[index - offset] = string[index];
  553.                 index++;
  554.         }
  555.         result[index - offset] = EOS;
  556.         return result;
  557. }
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