Advertisement
GuiButt

GPS Para o SBC

Sep 15th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 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 CorGPSVerde 0x009059FF
  14.  
  15. #else
  16.  
  17. #endif
  18.  
  19. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  20. {
  21. if(dialogid == GPS)
  22. {
  23. if(response)
  24. {
  25. if(listitem == 13)
  26. {
  27. ShowPlayerDialog(playerid, GPSL, DIALOG_STYLE_LIST, "{FFFFFF}Locais Diversos:", "{87CEFA}Montgomery\nBlueberry\nDillimore\nVinewood\nMarket\nConference Center", "Selecionar", "Voltar");
  28. }
  29. else if(listitem == 14)
  30. {
  31. RemovePlayerMapIcon(playerid, 69);
  32. SendClientMessage(playerid, -1, "{FF0000}!GPS Desligado!");
  33. }
  34. }
  35. }
  36. if(dialogid == GPSL)
  37. {
  38. if(response)
  39. {
  40. if(listitem == 0)
  41. {
  42. SetPlayerMapIcon(playerid, 69, 1308.0640,285.3542,19.2378, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Montgomery
  43. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  44. }
  45. else if(listitem == 1)
  46. {
  47. SetPlayerMapIcon(playerid, 69, 233.4631,-78.6278,1.2589, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Blueberry
  48. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  49. }
  50. else if(listitem == 2)
  51. {
  52. SetPlayerMapIcon(playerid, 69, 685.2550,-533.7612,16.0127, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Dillimore
  53. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  54. }
  55. else if(listitem == 3)
  56. {
  57. SetPlayerMapIcon(playerid, 69, 820.6790,-1142.1743,23.6573, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Vinewood
  58. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  59. }
  60. else if(listitem == 4)
  61. {
  62. SetPlayerMapIcon(playerid, 69, 1055.8334,-1284.6420,13.5495, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Market
  63. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  64. }
  65. else if(listitem == 5)
  66. {
  67. SetPlayerMapIcon(playerid, 69, 1172.7754,-1723.9891,13.4447, 41, 0, MAPICON_GLOBAL_CHECKPOINT); //Conference Center
  68. SendClientMessage(playerid, CorGPSVerde, "!GPS: Vá até o local marcado no mapa!");
  69. }
  70. }
  71. }
  72. return 1;
  73. }
  74.  
  75. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  76. {
  77. return 1;
  78. }
  79. CMD:gpsteste(playerid){
  80.  
  81. ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{009059}GPS - By GuiLopeS", "{FFFFFF}Rotas\nCentro de Licenças\nAluguel de Veiculos\nLocais Uteis\nBases\nCondominíos\nDelegacias\nTunadoras\nLocais de Roubo\nPosto Próximo\nLocalizar Casa\nLocalizar Empresa\nBônus Atual\nCidades e Bairros\nDesligar GPS", "Selecionar", "Sair");
  82. return 1;
  83. }
  84.  
  85. public OnPlayerUpdate(playerid)
  86. {
  87. if (IsPlayerInRangeOfPoint(playerid, 3.0, 1308.0640,285.3542,19.2378))
  88. {
  89. RemovePlayerMapIcon(playerid, 69);
  90. }
  91. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 233.4631,-78.6278,1.2589))
  92. {
  93. RemovePlayerMapIcon(playerid, 69);
  94. }
  95. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 685.2550,-533.7612,16.0127))
  96. {
  97. RemovePlayerMapIcon(playerid, 69);
  98. }
  99. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 820.6790,-1142.1743,23.6573))
  100. {
  101. RemovePlayerMapIcon(playerid, 69);
  102. }
  103. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1055.8334,-1284.6420,13.5495))
  104. {
  105. RemovePlayerMapIcon(playerid, 69);
  106. }
  107. else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1172.7754,-1723.9891,13.4447))
  108. {
  109. RemovePlayerMapIcon(playerid, 69);
  110. }
  111. return 1;
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement