Advertisement
Guest User

Sistema De GPS

a guest
May 6th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. // OnPlayerCommandText
  2. if(strcmp(cmd,"/gps",true) == 0)
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"GPS","Respawn Civil\r\nHospital\r\n24/7\r\nPrefeitura\r\nDepartamento de Policia","Selecionar","Fechar");
  7. gpson[playerid] = 1;
  8. return 1;
  9. }
  10. }
  11. // OnDialogResponse
  12. if(response)
  13. {
  14. switch(dialogid == 5)
  15. {
  16. case 1:
  17. {
  18. switch(listitem)
  19. {
  20. case 0:
  21. {
  22. SetPlayerCheckpoint(playerid,1242.7544,-1699.2177,14.8672,7.0);
  23. format(string,sizeof(string),"~b~Respawn Civil ~w~marcado no mapa.");
  24. GameTextForPlayer(playerid, string, 5000, 4);
  25. return 1;
  26. }
  27. case 1:
  28. {
  29. SetPlayerCheckpoint(playerid,1177.4385,-1323.5903,14.0707,7.0);
  30. format(string,sizeof(string),"~b~Hospital ~w~marcado no mapa.");
  31. GameTextForPlayer(playerid, string, 5000, 4);
  32. }
  33. case 2:
  34. {
  35. SetPlayerCheckpoint(playerid,1351.5773,-1755.7181,13.3459,7.0);
  36. format(string,sizeof(string),"~b~24/7 ~w~Marcado no mapa.");
  37. GameTextForPlayer(playerid, string, 5000, 4);
  38. }
  39. case 3:
  40. {
  41. SetPlayerCheckpoint(playerid,1481.4419,-1764.6077,18.7958,7.0);
  42. format(string,sizeof(string),"~b~Prefeitura ~w~Marcada no mapa.");
  43. GameTextForPlayer(playerid, string, 5000, 4);
  44. }
  45. case 4:
  46. {
  47. SetPlayerCheckpoint(playerid,1550.6753,-1675.6946,15.5132,7.0);
  48. format(string,sizeof(string),"~b~Departamento de Policia ~w~marcado no mapa.");
  49. GameTextForPlayer(playerid, string, 5000, 4);
  50. }
  51. }
  52. }
  53. }
  54. }
  55. // OnPlayerEnterCheckpoint
  56. if(gpson[playerid] == 1)
  57. {
  58. new string[70];
  59. format(string,sizeof(string),"Você chegou no local desejado e o GPS foi desativado.");
  60. SendClientMessage(playerid,BLUE,string);
  61. DisablePlayerCheckpoint(playerid);
  62. gpson[playerid] = 0;
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement