Advertisement
Guest User

Pedágios

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