SA-MP Forums Archive
[Ajuda] Corrida - 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] Corrida (/showthread.php?tid=544214)



Corrida - Ts3 - 31.10.2014

Tou com um problema no sistema de corrida que eu uso, quando entra mais de 3 players na mesma corrida o terceiro a entrar fica de 'G' (Carona) no veнculo dele, jб verifiquei todas as funзхes PutPlayerInVehicle mas nгo achei absolutamente nada! alguйm que jб teve o mesmo problema pode ajudar?

Link: https://sampforum.blast.hk/showthread.php?tid=377163


Re: Corrida - ArthurxD - 01.11.2014

Tambйm ja tive esse problema com esse FS, porйm nunca resolvi.
Procura algo como PutPlayerInVehicle(playerid, VehicleID, 1);
caso encontre troque por : PutPlayerInVehicle(playerid, VehicleID, 0);


Re: Corrida - ReyMysterio - 01.11.2014

Acho que o ъnico problema serнa o PutPlayerInVehicle porque nгo vejo outro tipo de bug possнvel no sistema.


Re: Corrida - Ts3 - 01.11.2014

Quote:
Originally Posted by ArthurxD
Посмотреть сообщение
Tambйm ja tive esse problema com esse FS, porйm nunca resolvi.
Procura algo como PutPlayerInVehicle(playerid, VehicleID, 1);
caso encontre troque por : PutPlayerInVehicle(playerid, VehicleID, 0);
Nгo achei nada, vocк tambйm tinha algum problema relacionado a ''Colocaзгo'' da corrida? as vezes tambйm buga fica ''14/2'' ''8/2''.

Quote:
Originally Posted by ReyMysterio
Посмотреть сообщение
Acho que o ъnico problema serнa o PutPlayerInVehicle porque nгo vejo outro tipo de bug possнvel no sistema.
Dei um CTRL + F procurei em tudo e nгo achei nada. =/

Serб que isso abaixo funcionaria?

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(NaCorrida[playerid] == true)
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER)
    {
      PutPlayerInVehicle(playerid, CriarVehCorrida[playerid], 0);
    }
    return 1;
}



Re: Corrida - ReyMysterio - 01.11.2014

Quote:
Originally Posted by Ts3
Посмотреть сообщение
Nгo achei nada, vocк tambйm tinha algum problema relacionado a ''Colocaзгo'' da corrida? as vezes tambйm buga fica ''14/2'' ''8/2''.



Dei um CTRL + F procurei em tudo e nгo achei nada. =/

Serб que isso abaixo funcionaria?

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(NaCorrida[playerid] == true)
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER)
    {
      PutPlayerInVehicle(playerid, CriarVehCorrida[playerid], 0);
    }
    return 1;
}
Nгo iria corrigir a 100%. Sу se vocк criasse um bloqueio para verificar se ele estб a pй ou nгo.


Re: Corrida - Ts3 - 01.11.2014

'-'

Mas ele nгo fica a pй, ele fica de G.


Re: Corrida - ReyMysterio - 01.11.2014

Sim mas nesse cуdigo que vocк criou para reparar o bug, imaginemos que ele estб a dirigir um veнculo quando vai para a corrida, isso jб nгo irб funcionar pois o oldstate = PLAYER_STATE_DRIVER


Re: Corrida - Ts3 - 01.11.2014

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(NaCorrida[playerid] == true)
    if(oldstate == PLAYER_STATE_ONFOOT && PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_PASSENGER)
    {
      PutPlayerInVehicle(playerid, CriarVehCorrida[playerid], 0);
    }
    return 1;
}
E assim?


Re: Corrida - ReyMysterio - 01.11.2014

Assim acho que ficarнa melhor

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(NaCorrida[playerid] == true)
    {
        if((oldstate == PLAYER_STATE_ONFOOT || oldstate == PLAYER_STATE_DRIVER) && newstate == PLAYER_STATE_PASSENGER)
        {
          PutPlayerInVehicle(playerid, CriarVehCorrida[playerid], 0);
        }
    }
    return 1;
}



Re: Corrida - Ts3 - 01.11.2014

Creio que essa seja a ъnica forma de ser resolvido mesmo, pois procurei no FS por:

pawn Код:
PutPlayerInVehicle(playerid, CriarVehCorrida[playerid], 1);
Nгo achei nada.

E quanto a colocaзгo da corrida tem alguma ideia do que esteja ''bugando''?

Vou dar um exemplo, tem trкs pessoas na corrida, se eu estou em ъltimo o correto seria 3/3 se estivesse em primeiro 1/3, mas nгo fica assim fica tipo mudando toda hora 14/3 || 8/3 .