Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.54 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4. #define TeleportsDialog 1
  5. #define TeleportsDialog2 2
  6. #define COLOR_WHITE 0xFFFFFFAA
  7. #define COLOR_RED 0xFF4646FF
  8.  
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" Teleports system loaded");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. print("\n--------------------------------------");
  21. print(" Teleports system unloaded");
  22. print("--------------------------------------\n");
  23. return 1;
  24. }
  25.  
  26. public OnPlayerCommandText(playerid, cmdtext[])
  27. {
  28. if (strcmp("/teles", cmdtext, true, 10) == 0)
  29. {
  30. ShowPlayerDialog(playerid, TeleportsDialog, DIALOG_STYLE_LIST, "Teleports!", "San Fierro Airport /sfair\nLos Santos Airport /lsair\nLas Venturas Airport /lvair\nLas Venturas /lv\nLos Santos /ls\nSan Fierro /sf\nMountain Chilliad /mc\nEpic Kart /epickart", "Go!", "Close");
  31. return 1;
  32. }
  33. if (strcmp("/teles2", cmdtext, true, 10) == 0)
  34. {
  35. ShowPlayerDialog(playerid, TeleportsDialog2, DIALOG_STYLE_LIST, "Teleports!","Drift zone 1 /drift1\nDrift Zone 2 /drift2\nDrift Zone 3 /drift3\nDrift Zone 4 /drift4\nDrift Zone 5 /drift5\nDrift Zone 6 /drift6\nTruck Stop /truckstop\nTuning Zone 1 /tune1\nTuning Zone 2 /tune 2\nTuning Zone 3 /tune 3\nTuning Zone 4 /tune4\nTuning Zone 5 /tune5\nAbondoned Airport /aa", "Go!", "Close");
  36. return 1;
  37. }
  38. if (strcmp("/sfair", cmdtext, true, 10) == 0)
  39. {
  40. SetPlayerPos(playerid,-1645.2598,-201.1026,14.1484);
  41. SendClientMessage(playerid, COLOR_WHITE, "Welcome to San Fierro Airport, have fun!");
  42. return 1;
  43. }
  44. if (strcmp("/epickart", cmdtext, true, 10) == 0)
  45. {
  46. SetPlayerPos(playerid, 1817.6039,-1306.6924,131.7344);
  47. return 1;
  48. }
  49. if (strcmp("/lsair", cmdtext, true, 10) == 0)
  50. {
  51. SetPlayerPos(playerid, 1952.8330,-2310.8213,13.5469);
  52. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Los Santos Airport, have fun!");
  53. return 1;
  54. }
  55. if (strcmp("/lvair", cmdtext, true, 10) == 0)
  56. {
  57. SetPlayerPos(playerid,1288.8962,1270.4429,10.8203);
  58. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Las Venturas Airport, have fun!");
  59. return 1;
  60. }
  61. if (strcmp("/lv", cmdtext, true, 10) == 0)
  62. {
  63. SetPlayerPos(playerid,2187.6245,1675.6443,11.1079);
  64. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Las Venturas, have fun!");
  65. return 1;
  66. }
  67. if (strcmp("/ls", cmdtext, true, 10) == 0)
  68. {
  69. SetPlayerPos(playerid,1547.5399,-1675.5754,14.1279);
  70. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Los Santos, have fun!");
  71. return 1;
  72. }
  73. if (strcmp("/sf", cmdtext, true, 10) == 0)
  74. {
  75. SetPlayerPos(playerid,-1983.4586,138.0214,27.6875);
  76. SendClientMessage(playerid, COLOR_WHITE, "Welcome to San Fierro, have fun!");
  77. return 1;
  78. }
  79. if (strcmp("/mc", cmdtext, true, 10) == 0)
  80. {
  81. SetPlayerPos(playerid,-2326.2622,-1654.2830,483.7031);
  82. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Mountain Chilliad, have fun!");
  83. return 1;
  84. }
  85. if (strcmp("/drift", cmdtext, true, 10) == 0)
  86. {
  87. SendClientMessage(playerid, COLOR_RED, "[ERROR] Correct usage: [/drift1-/drift2-/drift3-/drift4-/drift5-/drift6]");
  88. return 1;
  89. }
  90. if (strcmp("/drift1", cmdtext, true, 10) == 0)
  91. {
  92. SetPlayerPos(playerid,-305.5679,1514.8221,75.3594);
  93. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 1, have fun!");
  94. return 1;
  95. }
  96. if (strcmp("/drift2", cmdtext, true, 10) == 0)
  97. {
  98. SetPlayerPos(playerid,-2419.9121,-613.3422,132.5625);
  99. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 2, have fun!");
  100. return 1;
  101. }
  102. if (strcmp("/drift3", cmdtext, true, 10) == 0)
  103. {
  104. SetPlayerPos(playerid,2312.0754,1448.0342,42.8203);
  105. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 3, have fun!");
  106. return 1;
  107. }
  108. if (strcmp("/drift4", cmdtext, true, 10) == 0)
  109. {
  110. SetPlayerPos(playerid,-760.4178,-1677.0685,97.2406);
  111. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 4, have fun!");
  112. return 1;
  113. }
  114. if (strcmp("/drift5", cmdtext, true, 10) == 0)
  115. {
  116. SetPlayerPos(playerid,-2132.1201,918.6100,79.8516);
  117. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 5, have fun!");
  118. return 1;
  119. }
  120. if (strcmp("/drift6", cmdtext, true, 10) == 0)
  121. {
  122. SetPlayerPos(playerid,-797.2736,-109.8519,63.8398);
  123. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 6, have fun!");
  124. return 1;
  125. }
  126. if (strcmp("/truckstop", cmdtext, true, 10) == 0)
  127. {
  128. SetPlayerPos(playerid,-1562.7776,-2743.0483,48.5335);
  129. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Truck Stop, have fun!");
  130. return 1;
  131. }
  132. if (strcmp("/tune", cmdtext, true, 10) == 0)
  133. {
  134. SendClientMessage(playerid, COLOR_RED, "[ERROR] Correct usage: [/tune1-/tune2-/tune3-/tune4-/tune5]");
  135. return 1;
  136. }
  137. if (strcmp("/tune1", cmdtext, true, 10) == 0)
  138. {
  139. SetPlayerPos(playerid, -1936.1621,231.8937,34.1563);
  140. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 1, have fun!");
  141. return 1;
  142. }
  143. if (strcmp("/tune2", cmdtext, true, 10) == 0)
  144. {
  145. SetPlayerPos(playerid,-2709.9185,217.1673,4.1797);
  146. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 2, have fun!");
  147. return 1;
  148. }
  149. if (strcmp("/tune3", cmdtext, true, 10) == 0)
  150. {
  151. SetPlayerPos(playerid,2387.1025,1036.5139,10.8203);
  152. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 3, have fun!");
  153. return 1;
  154. }
  155. if (strcmp("/tune4", cmdtext, true, 10) == 0)
  156. {
  157. SetPlayerPos(playerid,2645.3201,-2002.9180,13.3828);
  158. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 4, have fun!");
  159. return 1;
  160. }
  161. if (strcmp("/tune5", cmdtext, true, 10) == 0)
  162. {
  163. SetPlayerPos(playerid,1041.7400,-1037.5100,31.7567);
  164. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 5, have fun!");
  165. return 1;
  166. }
  167. if (strcmp("/aa", cmdtext, true, 10) == 0)
  168. {
  169. SetPlayerPos(playerid, 388.6898,2440.1262,16.5000);
  170. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Abandoned Airport, have fun!");
  171. return 1;
  172. }
  173. return 0;
  174. }
  175.  
  176. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  177. {
  178. if(dialogid == TeleportsDialog)
  179. {
  180. if(response)
  181. {
  182.  
  183. if(listitem == 0)
  184. {
  185. SetPlayerPos(playerid, -1645.2598,-201.1026,14.1484);
  186. SendClientMessage(playerid, COLOR_WHITE, "Welcome to San Fierro Airport, have fun!");
  187. }
  188. if(listitem == 1)
  189. {
  190. SetPlayerPos(playerid, 1952.8330,-2310.8213,13.5469);
  191. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Los Santos Airport, have fun!");
  192. }
  193. if(listitem == 2)
  194. {
  195. SetPlayerPos(playerid,1288.8962,1270.4429,10.8203);
  196. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Las Venturas Airport, have fun!");
  197. }
  198. if(listitem == 3)
  199. {
  200. SetPlayerPos(playerid,2187.6245,1675.6443,11.1079);
  201. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Las Venturas, have fun!");
  202. }
  203. if(listitem == 4)
  204. {
  205. SetPlayerPos(playerid,1547.5399,-1675.5754,14.1279);
  206. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Los Santos, have fun!");
  207. }
  208. if(listitem == 5)
  209. {
  210. SetPlayerPos(playerid,-1983.4586,138.0214,27.6875);
  211. SendClientMessage(playerid, COLOR_WHITE, "Welcome to San Fierro, have fun!");
  212. }
  213. if(listitem == 6)
  214. {
  215. SetPlayerPos(playerid,-2326.2622,-1654.2830,483.7031);
  216. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Mountain Chilliad, have fun!");
  217. }
  218. if(listitem == 7)
  219. {
  220. SetPlayerPos(playerid, 1817.6039,-1306.6924,131.7344);
  221. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the EPIC KART, have fun!");
  222. }
  223. }
  224. return 1;
  225. }
  226. if(dialogid == TeleportsDialog2)
  227. {
  228. if(response)
  229. {
  230.  
  231. if(listitem == 0)
  232. {
  233. SetPlayerPos(playerid,-305.5679,1514.8221,75.3594);
  234. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 1, have fun!");
  235. }
  236. if(listitem == 1)
  237. {
  238. SetPlayerPos(playerid,-2419.9121,-613.3422,132.5625);
  239. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 2, have fun!");
  240. }
  241. if(listitem == 2)
  242. {
  243. SetPlayerPos(playerid,2312.0754,1448.0342,42.8203);
  244. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 3, have fun!");
  245. }
  246. if(listitem == 3)
  247. {
  248. SetPlayerPos(playerid,-760.4178,-1677.0685,97.2406);
  249. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 4, have fun!");
  250. }
  251. if(listitem == 4)
  252. {
  253. SetPlayerPos(playerid,-2132.1201,918.6100,79.8516);
  254. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 5, have fun!");
  255. }
  256. if(listitem == 5)
  257. {
  258. SetPlayerPos(playerid,-797.2736,-109.8519,63.8398);
  259. SendClientMessage(playerid, COLOR_WHITE, "Welcome to Drift Zone 6, have fun!");
  260. }
  261. if(listitem == 6)
  262. {
  263. SetPlayerPos(playerid,-1562.7776,-2743.0483,48.5335);
  264. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Truck Stop, have fun!");
  265. }
  266. if(listitem == 7)
  267. {
  268. SetPlayerPos(playerid, -1936.1621,231.8937,34.1563);
  269. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 1, have fun!");
  270. }
  271. if(listitem == 8)
  272. {
  273. SetPlayerPos(playerid,-2709.9185,217.1673,4.1797);
  274. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 2, have fun!");
  275. }
  276. if(listitem == 9)
  277. {
  278. SetPlayerPos(playerid,2387.1025,1036.5139,10.8203);
  279. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 3, have fun!");
  280. }
  281. if(listitem == 10)
  282. {
  283. SetPlayerPos(playerid,2645.3201,-2002.9180,13.3828);
  284. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 4, have fun!");
  285. }
  286. if(listitem == 11)
  287. {
  288. SetPlayerPos(playerid,1041.7400,-1037.5100,31.7567);
  289. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Tuning Zone 5, have fun!");
  290. }
  291. if(listitem == 12)
  292. {
  293. SetPlayerPos(playerid, 388.6898,2440.1262,16.5000);
  294. SendClientMessage(playerid, COLOR_WHITE, "Welcome to the Abandoned Airport, have fun!");
  295. }
  296. }
  297. return 1;
  298. }
  299.  
  300.  
  301. return 0;
  302. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement