Advertisement
Guest User

Untitled

a guest
Nov 30th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. ERRO GSP ABRINDO MENU DE PROFISSÕES:
  2. vou postar aqui tudo que meu GM tem sobre GPS:
  3.  
  4. new GPSPos[MAX_PLAYERS]; (LINHA 647)
  5.  
  6. new GPS_Spawned[MAX_PLAYERS]; (linha 735)
  7.  
  8.  
  9. new Text:gps[MAX_PLAYERS];
  10. enum GPSInfo
  11. {
  12. zone_name[30],
  13. Float:zone_minx,
  14. Float:zone_miny,
  15. Float:zone_minz,
  16. Float:zone_maxx,
  17. Float:zone_maxy,
  18. Float:zone_maxz
  19. }
  20. new Float:Zones[][GPSInfo] = {
  21. { "The Big Ear",-410.00, 1403.30,-3.00, -137.90, 1681.20, 200.00},
  22. { "Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00},
  23. { "Angel Pine", -2324.90, -2584.20,-6.10, -1964.20, -2212.10, 200.00},
  24. { "Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00},
  25. { "Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00},
  26. { "Avispa Country Club", -2831.80, -430.20,-6.10, -2646.40, -222.50, 200.00},
  27. ETX DE LUGARES (LINHA 790)
  28.  
  29.  
  30. forward GPS(); (LINHA 1176)
  31.  
  32.  
  33.  
  34. SetTimer("GPS", 800, 1); (LINHA 1574)
  35.  
  36.  
  37. gMax = GetMaxPlayers();
  38. for(new i=0; i<gMax; i++)
  39. {
  40. gps[i] = TextDrawCreate(3.0, 420.0,Text_Under_Minimap);
  41. TextDrawBackgroundColor(gps[i], 255);
  42. TextDrawFont(gps[i],2);
  43. TextDrawSetOutline(gps[i], 1);
  44. TextDrawColor(gps[i], -1);
  45. } ( LINHA 1866)
  46.  
  47.  
  48.  
  49. GPS_Spawned[playerid] = 0; (LINHA 2275)
  50.  
  51.  
  52. GPS_Spawned[playerid] = 1; ( LINHA 2528)
  53.  
  54.  
  55. new cmd[256];
  56. new idx;
  57. cmd = strtok(cmdtext, idx);
  58. new string[256];
  59. new specplayerid;
  60. if(PlayerInfo[playerid][Logged] == 0) return SendClientMessage(playerid, Vermelho, "Logue-se antes de usar um comando.");
  61. if(strcmp("/gps", cmdtext, true, 10) == 0)
  62. {
  63. new listitems[] = "Los Santos\n\n\n";
  64. ShowPlayerDialog(playerid,617,DIALOG_STYLE_LIST,"GPS:",listitems,"Local","Sair");
  65. return 1;
  66. } (LINHA 2702)
  67.  
  68.  
  69.  
  70. public OnPlayerEnterCheckpoint(playerid)
  71. {
  72. new checknome = CPS_GetPlayerCheckpoint(playerid);
  73.  
  74. if(GPSPos[playerid] == 1)
  75. {
  76. GPSPos[playerid] = 0;
  77. DisablePlayerCheckpoint(playerid);
  78. } (LINHA 12632)
  79.  
  80.  
  81.  
  82. public GPS()
  83. {
  84. new string[256];
  85. new random1 = random(sizeof(SVNAMES));
  86. format(string, sizeof(string), "hostname %s", SVNAMES[random1] );
  87. SendRconCommand(string);
  88.  
  89.  
  90. for (new i=0;i<MAX_PLAYERS;i++){
  91. if(IsPlayerConnected(i)){
  92. //=
  93. new Float:prevdist = 100000.000;
  94. new prevcp;
  95. for(new cpid=1; cpid < MAX_CHECKPOINTS; cpid++){
  96. if(UsedCPSlot[cpid]) {
  97. new Float:dist;
  98. dist = CPSERVICE_getdist(i,Checkpoints[cpid][cpX],Checkpoints[cpid][cpY],Checkpoints[cpid][cpZ]);
  99. if(dist < prevdist){
  100. prevdist = dist;
  101. prevcp = cpid;
  102. }
  103. }
  104. }
  105. new cpid=prevcp;
  106. if(CPSERVICE_getdist(i,Checkpoints[cpid][cpX],Checkpoints[cpid][cpY],Checkpoints[cpid][cpZ]) < Checkpoints[cpid][cpsd]) {
  107. if(CPSERVICE_actualcp[i] != cpid){
  108. SetPlayerCheckpoint(i,Checkpoints[cpid][cpX],Checkpoints[cpid][cpY],Checkpoints[cpid][cpZ],Checkpoints[cpid][cpsz]);
  109. CPSERVICE_actualcp[i] = cpid;
  110. }
  111. } else {
  112. if(CPSERVICE_actualcp[i] != 0){
  113. CPSERVICE_actualcp[i] = 0;
  114. DisablePlayerCheckpoint(i);
  115. }
  116. }
  117. //=
  118. } ( LINHA 20189)
  119.  
  120.  
  121.  
  122.  
  123. new str[256];
  124. if(GPS_Spawned[i] == 1)
  125. {
  126. format(str,sizeof(str),"%s", GetPlayerArea(i));
  127. TextDrawSetString(gps[i], str);
  128. TextDrawShowForPlayer(i, gps[i]);
  129. }
  130. else
  131. {
  132. TextDrawHideForPlayer(i, gps[i]);
  133. } (LINHA 20192)
  134.  
  135.  
  136.  
  137.  
  138. public OnPlayerDeath(playerid, killerid, reason)
  139. GPS_Spawned[playerid] = 0;
  140.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement