Guest User

[FS]Pedagios Total-Samp

a guest
Jun 10th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.08 KB | None | 0 0
  1. /* Vissite Nosso Site:
  2. http://total-samp.blogspot.com
  3.  
  4. http://total-samp.blogspot.com
  5. */
  6.  
  7.  
  8. #include <a_samp>
  9.  
  10. #define COLOR_YELLOW 0xFFFF00AA
  11. #define COLOR_BLUE 0x2641FEAA
  12. #define FILTERSCRIPT
  13. #pragma tabsize 0
  14.  
  15. new portao1;
  16. new portao2;
  17. new portao3;
  18. new portao4;
  19. new portao5;
  20. new portao6;
  21. new portao7;
  22. new portao8;
  23. new Pickup1;
  24. new Pickup2;
  25. new Pickup3;
  26. new Pickup4;
  27. new Pickup5;
  28. new Pickup6;
  29. new Pickup7;
  30. new Pickup8;
  31.  
  32. forward GateClose();
  33. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  34.  
  35. public OnFilterScriptInit()
  36. {
  37. print("\n--------------------------------------");
  38. print(" [ FS ] Pedagios ");
  39. print(" Creditos: By Dean ");
  40. print(" Não Retire os Creditos ");
  41. print("--------------------------------------\n");
  42.  
  43. Create3DTextLabel("Pedágio LS - SF",0xFFFFFFAA, 71.9957,-1534.3894,5.2046,25.0,0);
  44. Create3DTextLabel("Pedágio SF - LS",0xFFFFFFAA, 59.5030,-1532.9253,5.2139,25.0,0);
  45. Create3DTextLabel("Pedágio LV - LS",0xFFFFFFAA, 1737.4161,518.6452,28.1503,25.0,0);
  46. Create3DTextLabel("Pedágio LS - LV",0xFFFFFFAA, 1733.1107,506.8286,28.9694,25.0,0);
  47. Create3DTextLabel("Pedágio Bayside - SF",0xFFFFFFAA, -2681.8362,1280.4871,55.9456,25.0,0);
  48. Create3DTextLabel("Pedágio SF - FC",0xFFFFFFAA, -1412.3848,812.9502,47.7167,25.0,0);
  49. Create3DTextLabel("Pedágio FC - SF",0xFFFFFFAA, -1403.4413,822.1852,47.8172,25.0,0);
  50. Create3DTextLabel("Pedágio SF - Bayside",0xFFFFFFAA, -2681.8472,1268.6603,55.9456,25.0,0);
  51. Pickup1 = CreatePickup(1239, 1, 71.9957,-1534.3894,5.2046);
  52. Pickup2 = CreatePickup(1239, 1, 59.5030,-1532.9253,5.2139);
  53. Pickup3 = CreatePickup(1239, 1, 1737.4161,518.6452,28.1503);
  54. Pickup4 = CreatePickup(1239, 1, 1733.1107,506.8286,28.9694);
  55. Pickup5 = CreatePickup(1239, 1, -2681.8362,1280.4871,55.9456);
  56. Pickup6 = CreatePickup(1239, 1, -1412.3848,812.9502,47.7167);
  57. Pickup7 = CreatePickup(1239, 1, -1403.4413,822.1852,47.8172);
  58. Pickup8 = CreatePickup(1239, 1, -2681.8472,1268.6603,55.9456);
  59. portao1 = CreateObject(971, 68.328880, -1526.939087, 7.015985, 0.0000, 0.0000, 87.6625);
  60. portao2 = CreateObject(971, 67.909485, -1541.125732, 7.076734, 0.0000, 0.0000, 87.6625);
  61. portao3 = CreateObject(971, 1728.5638427734, 512.89862060547, 31.260879516602, 0, 0, 341.99890136719);
  62. portao4 = CreateObject(971, 1740.6317138672, 509.00531005859, 31.1568775177, 0, 0, 341.99340820313);
  63. portao5 = CreateObject(971, -1412.0205078125, 822.9267578125, 49.750095367432, 0, 0, 317.99926757813);
  64. portao6 = CreateObject(971, -1402.5791015625, 813.30859375, 49.656631469727, 0, 0, 315.99975585938);
  65. portao7 = CreateObject(971, -2685.9326171875, 1275.3663330078, 56.574485778809, 0, 0, 0);
  66. portao8 = CreateObject(971, -2677.2409667969, 1275.3305664063, 56.574516296387, 0, 0, 0);
  67. //objects portao1 e 2
  68. CreateObject(7033, 65.927567, -1533.642700, 8.355223, 0.8594, 0.0000, 83.3654);
  69. CreateObject(3877, 67.976868, -1531.783813, 5.551031, 0.0000, 0.0000, 353.9839);
  70. CreateObject(3877, 68.430626, -1522.038086, 5.578691, 0.0000, 0.0000, 356.5623);
  71. CreateObject(3877, 67.889786, -1545.917603, 5.697998, 0.0000, 0.0000, 356.5623);
  72. CreateObject(3877, 68.519646, -1536.313232, 5.706335, 0.0000, 0.0000, 354.8434);
  73. CreateObject(3864, 75.874809, -1534.855957, 10.345168, 0.0000, 0.0000, 173.5018);
  74. CreateObject(3864, 56.145210, -1532.551636, 10.351826, 0.0000, 0.0000, 353.9837);
  75. CreateObject(3877, 28.482025, -1527.640137, 5.680993, 0.0000, 0.0000, 351.4056);
  76. CreateObject(3877, 19.857996, -1525.820435, 5.018308, 0.0000, 0.0000, 348.8273);
  77. CreateObject(3877, 13.395845, -1524.428955, 4.614534, 0.0000, 0.0000, 348.8273);
  78. //objects portao3 e 4
  79. CreateObject(7033, 1735.2945556641, 512.66381835938, 31.834371566772, 0, 0, 339.99938964844);
  80. CreateObject(987, 1722.28125, 511.55117797852, 27.720676422119, 0, 4, 71.998901367188);
  81. CreateObject(987, 1726.1037597656, 523.12225341797, 26.624887466431, 0, 0, 113.99719238281);
  82. CreateObject(987, 1748.6484375, 514.7958984375, 27.250556945801, 0, 0, 249.99389648438);
  83. CreateObject(987, 1758.2679443359, 520.96795654297, 26.054347991943, 0, 356, 217.98910522461);
  84. CreateObject(987, 1711.2819824219, 503.29724121094, 28.032232284546, 0, 0, 31.997680664063);
  85. CreateObject(987, 1744.3728027344, 502.07650756836, 28.077571868896, 0, 0, 291.99621582031);
  86. CreateObject(1237, 1723.8087158203, 514.22821044922, 27.671068191528, 0, 0, 0);
  87. CreateObject(1237, 1745.0375976563, 506.91006469727, 27.669532775879, 0, 0, 0);
  88. //objects portao5 e 6
  89. CreateObject(7033, -1407.8485107422, 817.6396484375, 50.383720397949, 0, 0, 316);
  90. CreateObject(987, -1420.9528808594, 821.13604736328, 45.69006729126, 0, 0, 48);
  91. CreateObject(987, -1395.7629394531, 813.71850585938, 46.307685852051, 0, 0, 227.99877929688);
  92. CreateObject(978, -1415.3200683594, 834.03137207031, 47.445243835449, 0, 0, 318);
  93. CreateObject(978, -1423.9465332031, 826.30639648438, 47.367275238037, 0, 0, 317.99926757813);
  94. CreateObject(978, -1391.2713623047, 811.06884765625, 47.264514923096, 0, 0, 318);
  95. CreateObject(978, -1399.4782714844, 801.5634765625, 47.339115142822, 0, 0, 317.99926757813);
  96. //objects portao7 e 8
  97. CreateObject(987, -2672.3884277344, 1270.6895751953, 54.004661560059, 0, 0, 322.25);
  98. CreateObject(987, -2699.5107421875, 1262.8109130859, 53.97966003418, 0, 0, 41.745483398438);
  99.  
  100.  
  101. print("\n--------------------------------------");
  102. print(" [ FS ] Pedagios ");
  103. print(" Creditos: By Dean ");
  104. print(" Não Retire os Creditos ");
  105. print("--------------------------------------\n");
  106. return 1;
  107. }
  108.  
  109. public OnFilterScriptExit()
  110. {
  111. return 1;
  112. }
  113.  
  114. public OnPlayerPickUpPickup(playerid, pickupid) { // Início do public
  115. if(pickupid == Pickup1) { // Pickup definido
  116. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  117. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para SF use /plssf");
  118. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para LS use /psfls");
  119. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  120. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  121. }
  122. if(pickupid == Pickup2) { // Pickup definido
  123. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  124. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para LS use /psfls");
  125. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para SF use /plssf");
  126. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  127. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  128. }
  129. if(pickupid == Pickup3) { // Pickup definido
  130. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  131. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LV para LS use /plvls");
  132. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para LV use /plslv");
  133. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  134. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  135. }
  136. if(pickupid == Pickup4) { // Pickup definido
  137. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  138. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para LV use /plslv");
  139. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LV para LS use /plvls");
  140. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  141. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  142. }
  143. if(pickupid == Pickup5) { // Pickup definido
  144. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  145. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de Bayside para SF use /pbaysf");
  146. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para Bayside use /psfbay");
  147. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  148. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  149. }
  150. if(pickupid == Pickup6) { // Pickup definido
  151. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  152. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para FC use /psffc");
  153. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de FC para SF use /pfcsf");
  154. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  155. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  156. }
  157. if(pickupid == Pickup7) { // Pickup definido
  158. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  159. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de FC para SF use /pfcsf");
  160. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para FC use /psffc");
  161. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  162. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  163. }
  164. if(pickupid == Pickup8) { // Pickup definido
  165. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  166. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para Bayside use /psfbay");
  167. SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de Bayside para SF use /pbaysf");
  168. SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  169. SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  170. }
  171. return 1;
  172. }
  173.  
  174. public OnPlayerCommandText(playerid, cmdtext[])
  175. {
  176. if (strcmp(cmdtext, "/psfls", true)==0)
  177. {
  178. if(!PlayerToPoint(15.0, playerid, 59.5030,-1532.9253,5.2139))
  179. {
  180. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  181. return 1;
  182. }
  183. MoveObject(portao2,67.909485, -1541.125732, -0.773268, 5.5);
  184. SetTimer("GateClose", 2000, 0);
  185. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  186. GivePlayerMoney(playerid,-15);
  187. return 1;
  188. }
  189. if (strcmp(cmdtext, "/plssf", true)==0)
  190. {
  191. if(!PlayerToPoint(15.0, playerid, 71.9957,-1534.3894,5.2046))
  192. {
  193. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  194. return 1;
  195. }
  196. MoveObject(portao1,68.328880, -1526.939087, -0.809014, 5.5);
  197. SetTimer("GateClose", 2000, 0);
  198. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  199. GivePlayerMoney(playerid,-15);
  200. return 1;
  201. }
  202. if (strcmp(cmdtext, "/plvls", true)==0)
  203. {
  204. if(!PlayerToPoint(15.0, playerid, 1737.4161,518.6452,28.1503))
  205. {
  206. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  207. return 1;
  208. }
  209. MoveObject(portao3,1728.5638427734, 512.89862060547, -31.260879516602, 5.5);
  210. SetTimer("GateClose", 2000, 0);
  211. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  212. GivePlayerMoney(playerid,-15);
  213. return 1;
  214. }
  215. if (strcmp(cmdtext, "/plslv", true)==0)
  216. {
  217. if(!PlayerToPoint(15.0, playerid, 1733.1107,506.8286,28.9694))
  218. {
  219. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  220. return 1;
  221. }
  222. MoveObject(portao4,1740.6317138672, 509.00531005859, -31.1568775177, 5.5);
  223. SetTimer("GateClose", 2000, 0);
  224. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  225. GivePlayerMoney(playerid,-15);
  226. return 1;
  227. }
  228. if (strcmp(cmdtext, "/pbaysf", true)==0)
  229. {
  230. if(!PlayerToPoint(15.0, playerid, -2681.8362,1280.4871,55.9456))
  231. {
  232. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  233. return 1;
  234. }
  235. MoveObject(portao7,-2685.9326171875, 1275.3663330078, -56.574485778809, 5.5);
  236. SetTimer("GateClose", 2000, 0);
  237. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  238. GivePlayerMoney(playerid,-15);
  239. return 1;
  240. }
  241. if (strcmp(cmdtext, "/psfbay", true)==0)
  242. {
  243. if(!PlayerToPoint(15.0, playerid, -2681.8472,1268.6603,55.9456))
  244. {
  245. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  246. return 1;
  247. }
  248. MoveObject(portao8,-2677.2409667969, 1275.3305664063, -56.574516296387, 5.5);
  249. SetTimer("GateClose", 2000, 0);
  250. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  251. GivePlayerMoney(playerid,-15);
  252. return 1;
  253. }
  254. if (strcmp(cmdtext, "/pfcsf", true)==0)
  255. {
  256. if(!PlayerToPoint(15.0, playerid, -1403.4413,822.1852,47.8172))
  257. {
  258. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  259. return 1;
  260. }
  261. MoveObject(portao5,-1412.0205078125, 822.9267578125, -49.750095367432, 5.5);
  262. SetTimer("GateClose", 2000, 0);
  263. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  264. GivePlayerMoney(playerid,-15);
  265. return 1;
  266. }
  267. if (strcmp(cmdtext, "/psffc", true)==0)
  268. {
  269. if(!PlayerToPoint(15.0, playerid, -1412.3848,812.9502,47.7167))
  270. {
  271. SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  272. return 1;
  273. }
  274. MoveObject(portao6,-1402.5791015625, 813.30859375, -49.656631469727, 5.5);
  275. SetTimer("GateClose", 2000, 0);
  276. SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  277. GivePlayerMoney(playerid,-15);
  278. return 1;
  279. }
  280. return 0;
  281. }
  282.  
  283. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  284. {
  285. if(IsPlayerConnected(playerid))
  286. {
  287. new Float:oldposx, Float:oldposy, Float:oldposz;
  288. new Float:tempposx, Float:tempposy, Float:tempposz;
  289. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  290. tempposx = (oldposx -x);
  291. tempposy = (oldposy -y);
  292. tempposz = (oldposz -z);
  293. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  294. {
  295. return 1;
  296. }
  297. }
  298. return 0;
  299. }
  300.  
  301. public GateClose()
  302. {
  303. MoveObject (portao1,68.328880, -1526.939087, 7.015985, 2.5);
  304. MoveObject (portao2,67.909485, -1541.125732, 7.076734, 2.5);
  305. MoveObject (portao3,1728.5638427734, 512.89862060547, 31.260879516602, 2.5);
  306. MoveObject (portao4,1740.6317138672, 509.00531005859, 31.1568775177, 2.5);
  307. MoveObject (portao5,-1412.0205078125, 822.9267578125, 49.750095367432, 2.5);
  308. MoveObject (portao6,-1402.5791015625, 813.30859375, 49.656631469727, 2.5);
  309. MoveObject (portao7,-2685.9326171875, 1275.3663330078, 56.574485778809, 2.5);
  310. MoveObject (portao8,-2677.2409667969, 1275.3305664063, 56.574516296387, 2.5);
  311. return 1;
  312. }
Advertisement
Add Comment
Please, Sign In to add comment