Advertisement
Guest User

NtCat

a guest
Apr 17th, 2009
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define FILTERSCRIPT
  4.  
  5. new BoothNDirNGate;
  6. new BoothNDirSGate;
  7. new BoothSDirSGate;
  8. new BoothSDirNGate;
  9. new BoothNDirNPickup;
  10. new BoothNDirSPickup;
  11. new BoothSDirSPickup;
  12. new BoothSDirNPickup;
  13.  
  14. forward BoothNDirNGateClose();
  15. forward BoothNDirSGateClose();
  16. forward BoothSDirSGateClose();
  17. forward BoothSDirNGateClose();
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. print("\n--------------------------------------");
  22. print(" Gant Bridge Toll System by NtCat ");
  23. print("--------------------------------------\n");
  24.  
  25. CreateObject(9623,-2681.730,2160.756,57.157,0.0,0.0,1.719); // Toolbooth-N
  26. CreateObject(987,-2690.029,2160.083,52.805,0.0,0.0,-180.000); // object (4)
  27. CreateObject(987,-2661.735,2162.129,52.731,0.0,0.0,-180.000); // object (5)
  28. CreateObject(966,-2673.953,2166.259,54.430,0.0,0.0,-360.000); // object (6)
  29. BoothNDirNGate = CreateObject(968,-2674.023,2166.251,55.283,0.0,-91.100,0.0); // BoothN-DirectionN-Gate-CLOSED
  30. BoothNDirNPickup = CreatePickup(1274,14,-2677.487,2163.541,55.974); // BoothN-DirectionN-Pickup
  31. CreateObject(966,-2689.839,2155.394,54.505,0.0,0.0,-180.000); // object (10)
  32. BoothNDirSGate = CreateObject(968,-2689.874,2155.389,55.365,0.0,-91.100,180.000); // BoothN-DirectionS-Gate-CLOSED
  33. BoothNDirSPickup = CreatePickup(1274,14,-2686.848,2157.813,55.549); // BoothN-DirectionS-Pickup
  34. CreateObject(987,-2689.829,1275.247,52.880,0.0,0.0,-180.000); // object (13)
  35. CreateObject(987,-2661.341,1274.936,52.837,0.0,0.0,-180.000); // object (14)
  36. CreateObject(966,-2682.812,1269.417,54.396,0.0,0.0,-360.000); // object (15)
  37. BoothSDirSGate = CreateObject(968,-2682.571,1269.406,55.255,0.0,-91.100,0.0); // BoothS-DirectionS-Gate-CLOSED
  38. BoothSDirSPickup = CreatePickup(1274,14,-2686.098,1272.244,55.924); // BoothS-DirectionS-Pickup
  39. CreateObject(966,-2680.916,1279.752,54.381,0.0,0.0,-540.000); // object (20)
  40. BoothSDirNGate = CreateObject(968,-2681.075,1279.747,55.208,0.0,-91.100,-180.000); // BoothS-DirectionN-Gate-CLOSED
  41. CreateObject(968,-2681.071,1279.759,55.215,0.0,-1.719,-180.000); // BoothS-DirectionN-Gate-OPEN
  42. BoothSDirNPickup = CreatePickup(1274,14,-2677.246,1277.456,55.499); // BoothS-DirectionN-Pickup
  43. return 1;
  44. }
  45.  
  46. public OnPlayerPickUpPickup(playerid, pickupid)
  47. {
  48. if(pickupid == BoothNDirNPickup)
  49. {
  50. if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
  51. else
  52. {
  53. SetObjectRot(BoothNDirNGate,0.0,0.0,0.0);
  54. SetTimer("BoothNDirNGateClose",7000,0);
  55. }
  56. }
  57. else if(pickupid == BoothNDirSPickup)
  58. {
  59. if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
  60. else
  61. {
  62. GivePlayerMoney(playerid,-100);
  63. GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
  64. SetObjectRot(BoothNDirSGate,0.0,-1.719,180.000);
  65. SetTimer("BoothNDirSGateClose",7000,0);
  66. }
  67. }
  68. else if(pickupid == BoothSDirSPickup)
  69. {
  70. if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
  71. else
  72. {
  73. SetObjectRot(BoothSDirSGate,0.0,-2.578,0.0);
  74. SetTimer("BoothSDirSGateClose",7000,0);
  75. }
  76. }
  77. else if(pickupid == BoothSDirNPickup)
  78. {
  79. if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
  80. else
  81. {
  82. GivePlayerMoney(playerid,-100);
  83. GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
  84. SetObjectRot(BoothSDirNGate,0.0,-1.719,-180.000);
  85. SetTimer("BoothSDirNGateClose",7000,0);
  86. }
  87. }
  88. return 1;
  89. }
  90.  
  91. public BoothNDirNGateClose() SetObjectRot(BoothNDirNGate,0.0,-91.100,0.0);
  92. public BoothNDirSGateClose() SetObjectRot(BoothNDirSGate,0.0,-91.100,180.000);
  93. public BoothSDirSGateClose() SetObjectRot(BoothSDirSGate,0.0,-91.100,0.0);
  94. public BoothSDirNGateClose() SetObjectRot(BoothSDirNGate,0.0,-91.100,-180.000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement