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



Erro sistema - WendeLKILL - 01.03.2014

Bom Meu sistema de Taxi,Quando o Player Entra no taxi a Contagem de Dinheiro nгo para mesmo se ele ja estiver Saido do taxi eu axo que o erro pode estar nestas linhas.se alguem puder me ajudar agradeзo.
Код:
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
		{
		    if(IsPlayerConnected(TransportDriver[playerid]))
			{
			    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
			    TransportTime[TransportDriver[playerid]] = 0;
			    TransportCost[TransportDriver[playerid]] = 0;
			    format(gstring, sizeof(gstring), "~w~Custo da corrida~n~~r~R$%d",TransportCost[playerid]);
			    GameTextForPlayer(playerid, gstring, 5000, 1);
			    format(gstring, sizeof(gstring), "~w~Passageiro saiu do taxi~n~~g~ganhou R$%d",TransportCost[playerid]);
			    GameTextForPlayer(TransportDriver[playerid], gstring, 5000, 1);
				GivePlayerMoney(playerid, -TransportCost[playerid]);
				TransportCost[playerid] = 0;
				TransportTime[playerid] = 0;
    			TransportDriver[playerid] = 999;
			}
		}
		TelePos[playerid][0] = 0.0;
		TelePos[playerid][1] = 0.0;
    }