SHARE
TWEET

Untitled

a guest Jul 18th, 2016 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <streamer>
  3. #include <zcmd>
  4. //FORWARDS (TIMERS)
  5. forward TollGameOpen01();
  6. forward TollGameOpen02();
  7. forward TollGameOpen03();
  8. forward TollGameOpen04();
  9. forward TollGameOpen05();
  10. forward TollGameOpen06();
  11. forward TollGameOpen07();
  12. #if defined FILTERSCRIPT
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.  print("\n--------------------------------------");
  17.  print("Moving Objects by Spongegar");
  18.  print("--------------------------------------\n");
  19.  return 1;
  20. }
  21. public OnFilterScriptExit()
  22. {
  23.     return 1;
  24. }
  25.  
  26. #else
  27. //ROCKY MOUNTAIN
  28. new nb;
  29. new sb;
  30. //FORT CALHOUN
  31. new eb;
  32. new wb;
  33. new cg;
  34. new mg;
  35. main()
  36. {
  37.     print("\n----------------------------------");
  38.     print("Moving Objects by Spongegar");
  39.     print("----------------------------------\n");
  40. }
  41.  
  42. #endif
  43. public OnGameModeInit()
  44. {
  45. //ROCKY MOUNTAIN TOLL GATES
  46. nb = CreateObject(3578,1839.9758300,-3562.6206100,24.8720000,0.0000000,0.0000000,90.0000000); // North Bound Closed Blocker/Original Position
  47. sb = CreateObject(3578,1852.3601100,-3552.4511700,24.8720000,0.0000000,0.0000000,90.0000000); // South Bound Closed Blocker /Original Position
  48. //FORT CALHOUN TOLL GATES
  49. eb = CreateObject(3578, 3618.0732, 3150.8486, 26.3476,0.0000000,0.0000000,90.0000000); // East Bound Closed Blocker/Original Position
  50. wb = CreateObject(3578, 3606.4448, 3159.7026, 26.3491, 0.0000000,0.0000000,90.0000000); //West Bound Closed Clobker/Original Position
  51. cg = CreateObject (976, 3379.5000, 3716.4387, 15.8885, 0.0000000,0.0000000,180.0000000); //City Hall Closed Gate/Original Position
  52. mg = CreateObject (985, 3000.0281, 3166.0081, 17.7003, 0.0000000,0.0000000,180.0000000); //Mansion Closed Gate/Original Position
  53. //TIMERS TO CHECK IF A PLAYERS NEAR A SPECIFIC TOLL(SO IT CAN OPEN)
  54. SetTimer("TollGameOpen01", 3000, 1);
  55. SetTimer("TollGameOpen02", 3000, 1);
  56. SetTimer("TollGameOpen03", 3000, 1);
  57. SetTimer("TollGameOpen04", 3000, 1);
  58. SetTimer("TollGameOpen05", 3000, 1);
  59. SetTimer("TollGameOpen06", 3000, 1);
  60. SetTimer("TollGameOpen07", 3000, 1);
  61. }
  62. public TollGameOpen01()
  63. {
  64.         new open;
  65.         for(new i=GetMaxPlayers(); i > -1; i--)
  66.         {
  67.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 1839.9758300,-3562.6206100,24.872000))
  68.                 {
  69.                     new vehicleid = GetPlayerVehicleID(i);
  70.                     if(IsPlayerInVehicle(i, vehicleid))
  71.                         {
  72.                                 open = 1;
  73.                                 MoveObject(nb, 1839.9956, -3562.6233, 23.4365, 3) && GivePlayerMoney(i,-8) && GameTextForPlayer(i,"$8\nThank You",3000,4);
  74.                                 break;
  75.                         }
  76.                 }
  77.         }
  78.         if(!open)
  79.                 MoveObject(nb, 1839.9758300, -3562.6206100, 24.872000, 2.0);
  80. }
  81. public TollGameOpen02()
  82. {
  83.         new open;
  84.         for(new i=GetMaxPlayers(); i > -1; i--)
  85.         {
  86.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 1852.3601, -3552.4512, 24.8720000))
  87.                 {
  88.                     new vehicleid = GetPlayerVehicleID(i);
  89.                     if(IsPlayerInVehicle(i, vehicleid))
  90.                         {
  91.                                 open = 1;
  92.                                 MoveObject(sb, 1852.3601, -3552.4512, 23.3609, 3) && GivePlayerMoney(i,-8) && GameTextForPlayer(i,"$8\nThank You",3000,4);
  93.                                 break;
  94.                         }
  95.                 }
  96.         }
  97.         if(!open)
  98.                 MoveObject(sb, 1852.3601, -3552.4512, 24.8720000, 2.0);
  99. }
  100. public TollGameOpen03()
  101. {
  102.         new open;
  103.         for(new i=GetMaxPlayers(); i > -1; i--)
  104.         {
  105.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 3618.0732, 3150.8486, 26.3476))
  106.                 {
  107.                     new vehicleid = GetPlayerVehicleID(i);
  108.                     if(IsPlayerInVehicle(i, vehicleid))
  109.                         {
  110.                                 open = 1;
  111.                                 MoveObject(eb, 3618.0732, 3150.8486, 25.0366, 3) && GivePlayerMoney(i,-8) && GameTextForPlayer(i,"$8\nThank You",3000,4);
  112.                                 break;
  113.                         }
  114.                 }
  115.         }
  116.         if(!open)
  117.                 MoveObject(eb, 3618.0732, 3150.8486, 26.3476, 2.0);
  118. }
  119. public TollGameOpen04()
  120. {
  121.         new open;
  122.         for(new i=GetMaxPlayers(); i > -1; i--)
  123.         {
  124.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 3618.0732, 3150.8486, 26.3476))
  125.                 {
  126.                     new vehicleid = GetPlayerVehicleID(i);
  127.                     if(IsPlayerInVehicle(i, vehicleid))
  128.                         {
  129.                                 open = 1;
  130.                                 MoveObject(eb, 3618.0732, 3150.8486, 25.0366, 3) && GivePlayerMoney(i,-8) && GameTextForPlayer(i,"$8\nThank You",3000,4);
  131.                                 break;
  132.                         }
  133.                 }
  134.         }
  135.         if(!open)
  136.                 MoveObject(eb, 3618.0732, 3150.8486, 26.3476, 2.0);
  137. }
  138. public TollGameOpen05()
  139. {
  140.         new open;
  141.         for(new i=GetMaxPlayers(); i > -1; i--)
  142.         {
  143.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 3606.4448, 3159.7026, 26.3491))
  144.                 {
  145.                     new vehicleid = GetPlayerVehicleID(i);
  146.                     if(IsPlayerInVehicle(i, vehicleid))
  147.                         {
  148.                                 open = 1;
  149.                                 MoveObject(wb, 3606.4448, 3159.7026, 25.0208, 3) && GivePlayerMoney(i,-8) && GameTextForPlayer(i,"$8\nThank You",3000,4);
  150.                                 break;
  151.                         }
  152.                 }
  153.         }
  154.         if(!open)
  155.                 MoveObject(wb, 3606.4448, 3159.7026, 26.3491, 2.0);
  156. }
  157. public TollGameOpen06() //FORT CALHOUN CAPITAL GATE
  158. {
  159.         new open;
  160.         for(new i=GetMaxPlayers(); i > -1; i--)
  161.         {
  162.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 3379.5000, 3716.4387, 15.8885))
  163.                 {
  164.                     new vehicleid = GetPlayerVehicleID(i);
  165.                     if(IsPlayerInVehicle(i, vehicleid))
  166.                         {
  167.                                 open = 1;
  168.                                 MoveObject(cg, 3371.5000, 3716.4387, 15.8885, 3);
  169.                                 break;
  170.                         }
  171.                 }
  172.         }
  173.         if(!open)
  174.                 MoveObject(cg, 3379.5000, 3716.4387, 15.8885, 2.0);
  175. }
  176. public TollGameOpen07()//FORT CALHOUN MANSION GATE
  177. {
  178.         new open;
  179.         for(new i=GetMaxPlayers(); i > -1; i--)
  180.         {
  181.                 if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 8, 3000.0281, 3166.0081, 17.7003))
  182.                 {
  183.                     new vehicleid = GetPlayerVehicleID(i);
  184.                     if(IsPlayerInVehicle(i, vehicleid))
  185.                         {
  186.                                 open = 1;
  187.                                 MoveObject(mg, 2992.5681, 3166.0081, 17.7003, 3);
  188.                                 break;
  189.                         }
  190.                 }
  191.         }
  192.         if(!open)
  193.                 MoveObject(mg, 3000.0281, 3166.0081, 17.7003, 2.0);
  194. }
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