SA-MP Forums Archive
[Ajuda] Checkpoints dando conflito - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Checkpoints dando conflito (/showthread.php?tid=594841)



Checkpoints dando conflito - RyanMachado - 24.11.2015

Olб a todos, estou com um novo problema, criei rotas para algumas profissхes mas quando o player entra no Primeiro Checkpoint para comecar a missao de Entregador do Correio aparece o checkpoint de destino do Taxista e nгo a do Entregador do Correio, ja chequei o cуdigo inteiro e estava tudo normal, alguem pode me ajudar a resolver isso ?

Код:
new PontoTaxi[MAX_PLAYERS];
new PontoCorreio[MAX_PLAYERS];
Код:
new Float:MissaoTaxi[4][3] =
{
     {1808.1852,-1854.6968,13.4141},
     {997.1834,-914.2678,42.1797},
     {1808.1852,-1854.6968,13.4141},
     {1405.8074,451.0172,19.9148}
};

new Float:MissaoCorreio[4][3] =
{
     {1339.9880,341.2941,19.5547},
     {2804.5779,-1085.0300,30.7332},
     {1345.9880,341.2941,19.5547},
     {1703.7874,1033.0189,10.8203}
};
public OnPlayerEnterRaceCheckpoint(playerid)

Код:
switch(PontoTaxi[playerid])
     {
         case 0:
         {
       		  DisablePlayerRaceCheckpoint(playerid);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк precisa ir atй o checkpoint {FF0000}Vermelho.");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Apуs terminar a entrega vocк irб receber uma grana extra !");
       		  SetPlayerRaceCheckpoint(playerid, 0, MissaoTaxi[1][0], MissaoTaxi[1][1], MissaoTaxi[1][2],MissaoTaxi[1][0], MissaoTaxi[1][1], MissaoTaxi[1][2], 10);
       		  PontoTaxi[playerid] = 1;
   	    	  return 1;
         }
         case 1:
         {
              PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Prabйns, vocк chegou atй o destino !");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк terminou o trabalho e ganhou {00CD66}$500 !");
       		  GivePlayerGrana(playerid, 500);
              DisablePlayerRaceCheckpoint(playerid);
              RemovePlayerFromVehicle(playerid);
              GameTextForPlayer(playerid, "MISSAO COMPLETA", 3000, 4);
              Trabalhando[playerid] = 0;
              return 1;
         }
         case 2:
         {
       		  DisablePlayerRaceCheckpoint(playerid);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк precisa ir atй o checkpoint {FF0000}Vermelho.");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Apуs terminar a entrega vocк irб receber uma grana extra !");
       		  SetPlayerRaceCheckpoint(playerid, 0, MissaoTaxi[3][0], MissaoTaxi[3][1], MissaoTaxi[3][2],MissaoTaxi[3][0], MissaoTaxi[3][1], MissaoTaxi[3][2], 10);
       		  PontoTaxi[playerid] = 3;
   	    	  return 1;
         }
         case 3:
         {
              PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Prabйns, vocк chegou atй o destino !");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк terminou o trabalho e ganhou {00CD66}$700 !");
       		  GivePlayerGrana(playerid, 700);
              DisablePlayerRaceCheckpoint(playerid);
              RemovePlayerFromVehicle(playerid);
              GameTextForPlayer(playerid, "MISSAO COMPLETA", 3000, 4);
              Trabalhando[playerid] = 0;
              return 1;
         }
    }
    
    switch(PontoCorreio[playerid])
     {
         case 0:
         {
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк precisa ir atй o checkpoint {FF0000}Vermelho.");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Apуs terminar a entrega dos pacotes vocк irб receber uma grana extra !");
       		  SetPlayerRaceCheckpoint(playerid, 0, MissaoCorreio[1][0], MissaoCorreio[1][1], MissaoCorreio[1][2],MissaoCorreio[1][0], MissaoCorreio[1][1], MissaoCorreio[1][2], 10);
       		  PontoCorreio[playerid] = 1;
       		  DisablePlayerRaceCheckpoint(playerid);
   	    	  return 1;
         }
         case 1:
         {
              PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Prabйns, vocк chegou atй o destino !");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк terminou o trabalho e ganhou {00CD66}$650 !");
       		  GivePlayerGrana(playerid, 650);
              DisablePlayerRaceCheckpoint(playerid);
              RemovePlayerFromVehicle(playerid);
              GameTextForPlayer(playerid, "MISSAO COMPLETA", 3000, 4);
              Trabalhando[playerid] = 0;
              return 1;
         }
         case 2:
         {
       		  DisablePlayerRaceCheckpoint(playerid);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк precisa ir atй o checkpoint {FF0000}Vermelho.");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Apуs terminar a entrega dos pacotes vocк irб receber uma grana extra !");
       		  SetPlayerRaceCheckpoint(playerid, 0, MissaoCorreio[3][0], MissaoCorreio[3][1], MissaoCorreio[3][2],MissaoCorreio[3][0], MissaoCorreio[3][1], MissaoCorreio[3][2], 10);
       		  PontoCorreio[playerid] = 3;
   	    	  return 1;
         }
         case 3:
         {
              PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Prabйns, vocк chegou atй o destino !");
       		  SendClientMessage(playerid, -1, "{00CD66}[TRABALHO]: {FFFFFF}Vocк terminou o trabalho e ganhou {00CD66}$1000 !");
       		  GivePlayerGrana(playerid, 1000);
              DisablePlayerRaceCheckpoint(playerid);
              RemovePlayerFromVehicle(playerid);
              GameTextForPlayer(playerid, "MISSAO COMPLETA", 3000, 4);
              Trabalhando[playerid] = 0;
              return 1;
         }
    }