GuiButt

GPS by GuiLopeS

Jan 17th, 2021 (edited)
641
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.03 KB | None | 0 0
  1. // Sistema de GPS com mapicon by GuiLopeS
  2. // Aproveitem bem essa fs é facil de entender!
  3.  
  4. #define FILTERSCRIPT
  5.  
  6. #include <a_samp>
  7. #include <zcmd>
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. #define GPS 1777
  12. #define GPSL 1778
  13. #define GPSP 1779
  14. #define GPST 1780
  15. #define GPSH 1781
  16. #define GPSM 1782
  17. #define GPSG 1783
  18. #define CorGPSVerde 0x009059FF
  19.  
  20. #else
  21.  
  22. #endif
  23.  
  24. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  25. {
  26. if(dialogid == GPS)
  27. {
  28. if(response)
  29. {
  30. if(listitem == 0)
  31. {
  32. ShowPlayerDialog(playerid, GPSL, DIALOG_STYLE_LIST, "{CCCCCC}Locais Diversos:", "{3366FF}Local para tirar licenças\n{3366FF}Prefeitura\n{3366FF}Base principal do servidor\n{3366FF}Departamento da Polícia", "Selecionar", "Voltar");
  33. }
  34. else if(listitem == 1)
  35. {
  36. ShowPlayerDialog(playerid, GPSP, DIALOG_STYLE_LIST, "{CCCCCC}Locais das profissões:", "{FF6600}Transportes\n{00C900}Honestas\n{FB0000}Mafia\n{E6E6E6}Governo", "Selecionar", "Voltar");
  37. }
  38. else if(listitem == 2)
  39. {
  40. RemovePlayerMapIcon(playerid, 69);
  41. SendClientMessage(playerid, -1, "{FF0000}!GPS Desligado!");
  42. }
  43. }
  44. }
  45. if(dialogid == GPSL)
  46. {
  47. if(response)
  48. {
  49. if(listitem == 0)
  50. {
  51. SetPlayerMapIcon(playerid, 69, 263.5748,1419.3909,10.6054, 41, 0, MAPICON_GLOBAL); //Licenças
  52. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  53. }
  54. else if(listitem == 1)
  55. {
  56. SetPlayerMapIcon(playerid, 69, 318.9544,870.1324,20.3990, 41, 0, MAPICON_GLOBAL); //Prefeitura
  57. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  58. }
  59. else if(listitem == 2)
  60. {
  61. SetPlayerMapIcon(playerid, 69, 45.1479,782.1489,39.0371, 41, 0, MAPICON_GLOBAL); //Base
  62. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  63. }
  64. else if(listitem == 3)
  65. {
  66. SetPlayerMapIcon(playerid, 69, 318.9544,870.1324,20.3990, 41, 0, MAPICON_GLOBAL); //Departamento da Polícia
  67. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  68. }
  69. }
  70. }
  71. if(dialogid == GPSP)
  72. {
  73. if(response)
  74. {
  75. if(listitem == 0)
  76. {
  77. ShowPlayerDialog(playerid, GPST, DIALOG_STYLE_LIST, "{CCCCCC}Escolha:", "{FFB300}Petroleiro\n{FFB300}Minerador\n{FFB300}Carregador\n{FFB300}Transportador\n{FFF600}Motorista de Carreta\n{80FFFF}Piloto", "Selecionar", "Voltar");
  78. }
  79. else if(listitem == 1)
  80. {
  81. ShowPlayerDialog(playerid, GPSH, DIALOG_STYLE_LIST, "{CCCCCC}Escolha:", "{FFF600}Taxista\n{696969}Mecânico\n{CD6839}Funcionário do Dnit\n{FF1493}Agênte dos Correios\n{00CD66}Motorista de Ônibus", "Selecionar", "Voltar");
  82. }
  83. else if(listitem == 2)
  84. {
  85. ShowPlayerDialog(playerid, GPSM, DIALOG_STYLE_LIST, "{CCCCCC}Escolha:", "{C90000}Mafia\n{C90000}Info", "Selecionar", "Voltar");
  86. }
  87. else if(listitem == 3)
  88. {
  89. ShowPlayerDialog(playerid, GPSG, DIALOG_STYLE_LIST, "{CCCCCC}Escolha:", "{B22222}Bombeiro\n{08008B}Policial\n{8B008B}Advogado\n{008B8B}Médico", "Selecionar", "Voltar");
  90. }
  91. }
  92. }
  93. if(dialogid == GPST)
  94. {
  95. if(response)
  96. {
  97. if(listitem == 0)
  98. {
  99. SetPlayerMapIcon(playerid, 69, 263.5748,1419.3909,10.6054, 41, 0, MAPICON_GLOBAL); //Petroleiro
  100. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  101. }
  102. else if(listitem == 1)
  103. {
  104. SetPlayerMapIcon(playerid, 69, 318.9544,870.1324,20.3990, 41, 0, MAPICON_GLOBAL); //Minerador
  105. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  106. }
  107. else if(listitem == 2)
  108. {
  109. SetPlayerMapIcon(playerid, 69, -504.6494,-559.7720,25.5234, 41, 0, MAPICON_GLOBAL); //Carregador
  110. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  111. }
  112. else if(listitem == 3)
  113. {
  114. SetPlayerMapIcon(playerid, 69, 2717.5540,-2496.4570,13.6641, 41, 0, MAPICON_GLOBAL); //Transportador
  115. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  116. }
  117. else if(listitem == 4)
  118. {
  119. SetPlayerMapIcon(playerid, 69, 1287.7468,-629.8488,14.1484, 41, 0, MAPICON_GLOBAL); //Motorista de Carreta
  120. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  121. }
  122. else if(listitem == 5)
  123. {
  124. SetPlayerMapIcon(playerid, 69, 1917.2087,-2641.4160,13.5469, 41, 0, MAPICON_GLOBAL); //Piloto
  125. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  126. }
  127. }
  128. }
  129. if(dialogid == GPSH)
  130. {
  131. if(response)
  132. {
  133. if(listitem == 0)
  134. {
  135. SetPlayerMapIcon(playerid, 69, -2041.9374,450.9368,35.1723, 41, 0, MAPICON_GLOBAL); //Taxista
  136. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  137. }
  138. else if(listitem == 1)
  139. {
  140. SetPlayerMapIcon(playerid, 69, -1898.1252,-1699.6882,21.7500, 41, 0, MAPICON_GLOBAL); //Mecanico
  141. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  142. }
  143. else if(listitem == 2)
  144. {
  145. SetPlayerMapIcon(playerid, 69, 161.1844,-22.6044,1.5781, 41, 0, MAPICON_GLOBAL); //Dnit
  146. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  147. }
  148. else if(listitem == 3)
  149. {
  150. SetPlayerMapIcon(playerid, 69, 2343.7930,2738.2839,10.8203, 41, 0, MAPICON_GLOBAL); //Correio
  151. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  152. }
  153. else if(listitem == 4)
  154. {
  155. SetPlayerMapIcon(playerid, 69, 1220.7992,-1814.7672,16.5938, 41, 0, MAPICON_GLOBAL); //Motorista de Onibus
  156. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  157. }
  158. }
  159. }
  160. if(dialogid == GPSM)
  161. {
  162. if(response)
  163. {
  164. if(listitem == 0)
  165. {
  166. SetPlayerMapIcon(playerid, 69, -368.7520,2219.4758,42.4912, 41, 0, MAPICON_GLOBAL); //Mafioso
  167. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  168. }
  169. else if(listitem == 1)
  170. {
  171. SendClientMessage(playerid, -1, "{B52600}[!]Novas profissões em desenvolvimento!");
  172. }
  173. }
  174. }
  175.  
  176. if(dialogid == GPSG)
  177. {
  178. if(response)
  179. {
  180. if(listitem == 0)
  181. {
  182. SetPlayerMapIcon(playerid, 69, -2044.6509,59.6098,28.3906, 41, 0, MAPICON_GLOBAL); //Bombeiro
  183. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  184. }
  185. else if(listitem == 1)
  186. {
  187. SetPlayerMapIcon(playerid, 69, 1549.7046,-1633.5668,13.5451, 41, 0, MAPICON_GLOBAL); //Policia
  188. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  189. }
  190. else if(listitem == 2)
  191. {
  192. SetPlayerMapIcon(playerid, 69, 1473.1677,-1769.4954,18.7958, 41, 0, MAPICON_GLOBAL); //Advogado
  193. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  194. }
  195. else if(listitem == 3)
  196. {
  197. SetPlayerMapIcon(playerid, 69, 1179.2963,-1319.9264,14.1624, 41, 0, MAPICON_GLOBAL); //Medico
  198. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  199. }
  200. }
  201. }
  202. if(dialogid == GPSL)
  203. {
  204. if(!response) return ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{009059}GPS - Servidor {FFFFFF}BRT ®", "{CCCCCC}Locais Diversos\nLocais das profissões\n{FF0000}Desligar GPS", "Selecionar", "Sair");
  205. }
  206. if(dialogid == GPSP)
  207. {
  208. if(!response) return ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{009059}GPS - Servidor {FFFFFF}BRT ®", "{CCCCCC}Locais Diversos\nLocais das profissões\n{FF0000}Desligar GPS", "Selecionar", "Sair");
  209. }
  210. if(dialogid == GPST)
  211. {
  212. if(!response) return ShowPlayerDialog(playerid, GPSP, DIALOG_STYLE_LIST, "{CCCCCC}Locais das profissões:", "{FF6600}Transportes\n{00C900}Honestas\n{FB0000}Mafia\n{E6E6E6}Governo", "Selecionar", "Voltar");
  213. }
  214. if(dialogid == GPSH)
  215. {
  216. if(!response) return ShowPlayerDialog(playerid, GPSP, DIALOG_STYLE_LIST, "{CCCCCC}Locais das profissões:", "{FF6600}Transportes\n{00C900}Honestas\n{FB0000}Mafia\n{E6E6E6}Governo", "Selecionar", "Voltar");
  217. }
  218. if(dialogid == GPSM)
  219. {
  220. if(!response) return ShowPlayerDialog(playerid, GPSP, DIALOG_STYLE_LIST, "{CCCCCC}Locais das profissões:", "{FF6600}Transportes\n{00C900}Honestas\n{FB0000}Mafia\n{E6E6E6}Governo", "Selecionar", "Voltar");
  221. }
  222. if(dialogid == GPSG)
  223. {
  224. if(!response) return ShowPlayerDialog(playerid, GPSP, DIALOG_STYLE_LIST, "{CCCCCC}Locais das profissões:", "{FF6600}Transportes\n{00C900}Honestas\n{FB0000}Mafia\n{E6E6E6}Governo", "Selecionar", "Voltar");
  225. }
  226. return 1;
  227. }
  228.  
  229. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  230. {
  231. return 1;
  232. }
  233. CMD:gps(playerid){
  234.  
  235. ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{009059}GPS - Servidor {FFFFFF}BRT ® By GuiLopeS", "{CCCCCC}Locais Diversos\nLocais das profissões\n{FF0000}Desligar GPS", "Selecionar", "Sair");
  236. return 1;
  237. }
  238.  
  239. public OnPlayerUpdate(playerid)
  240. {
  241. if (IsPlayerInRangeOfPoint(playerid, 3.0, 263.5748,1419.3909,10.6054))
  242. {
  243. RemovePlayerMapIcon(playerid, 69);
  244. }
  245. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 318.9544,870.1324,20.3990))
  246. {
  247. RemovePlayerMapIcon(playerid, 69);
  248. }
  249. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 45.1479,782.1489,39.0371))
  250. {
  251. RemovePlayerMapIcon(playerid, 69);
  252. }
  253. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 318.9544,870.1324,20.3990))
  254. {
  255. RemovePlayerMapIcon(playerid, 69);
  256. }
  257. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 263.5748,1419.3909,10.6054))
  258. {
  259. RemovePlayerMapIcon(playerid, 69);
  260. }
  261. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 318.9544,870.1324,20.3990))
  262. {
  263. RemovePlayerMapIcon(playerid, 69);
  264. }
  265. else if (IsPlayerInRangeOfPoint(playerid, 3.0, -504.6494,-559.7720,25.5234))
  266. {
  267. RemovePlayerMapIcon(playerid, 69);
  268. }
  269. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 2717.5540,-2496.4570,13.6641))
  270. {
  271. RemovePlayerMapIcon(playerid, 69);
  272. }
  273. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1287.7468,-629.8488,14.1484))
  274. {
  275. RemovePlayerMapIcon(playerid, 69);
  276. }
  277. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1917.2087,-2641.4160,13.5469))
  278. {
  279. RemovePlayerMapIcon(playerid, 69);
  280. }
  281. else if (IsPlayerInRangeOfPoint(playerid, 3.0, -2041.9374,450.9368,35.1723))
  282. {
  283. RemovePlayerMapIcon(playerid, 69);
  284. }
  285. else if (IsPlayerInRangeOfPoint(playerid, 3.0, -1898.1252,-1699.6882,21.7500))
  286. {
  287. RemovePlayerMapIcon(playerid, 69);
  288. }
  289. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 161.1844,-22.6044,1.5781))
  290. {
  291. RemovePlayerMapIcon(playerid, 69);
  292. }
  293. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 2343.7930,2738.2839,10.8203))
  294. {
  295. RemovePlayerMapIcon(playerid, 69);
  296. }
  297. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1220.7992,-1814.7672,16.5938))
  298. {
  299. RemovePlayerMapIcon(playerid, 69);
  300. }
  301. else if (IsPlayerInRangeOfPoint(playerid, 3.0, -368.7520,2219.4758,42.4912))
  302. {
  303. RemovePlayerMapIcon(playerid, 69);
  304. }
  305. else if (IsPlayerInRangeOfPoint(playerid, 3.0, -2044.6509,59.6098,28.3906))
  306. {
  307. RemovePlayerMapIcon(playerid, 69);
  308. }
  309. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1549.7046,-1633.5668,13.5451))
  310. {
  311. RemovePlayerMapIcon(playerid, 69);
  312. }
  313. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1473.1677,-1769.4954,18.7958))
  314. {
  315. RemovePlayerMapIcon(playerid, 69);
  316. }
  317. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1179.2963,-1319.9264,14.1624))
  318. {
  319. RemovePlayerMapIcon(playerid, 69);
  320. }
  321.  
  322. return 1;
  323. }
  324.  
Add Comment
Please, Sign In to add comment