[Ajuda] Corrida
#1

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
Reply
#2

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);
Reply
#3

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

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;
}
Reply
#5

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.
Reply
#6

'-'

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

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
Reply
#8

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?
Reply
#9

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;
}
Reply
#10

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 .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)