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



[Ajuda]Pequeno bug - blackunik - 10.04.2012

bom pessoal meu gamemode tem uma concessonaria que ao comprar um carro e dar /estacionar e reiniciar o server ele diz que nao tenho carro logo abaixo segue o comand /comprarcarro

Код:
if(strcmp(cmd, "/comprarcarro", true) == 0)
	{
		if(IsPlayerInConcePlace(playerid))
		{
			for(new i=0;i<MAX_PLAYERS;i++)
			{
				if(Conce[i]==1)
				{
					SendClientMessage(playerid, COLOR_OOC, "Jб tem Alguem sendo Atendido, volte daqui a pouco!");
					TogglePlayerControllable(playerid, 1);
					return 1;
				}
			}
			if (GetOwnedVehicleID(playerid) != INVALID_VEHICLE_ID) return SendClientMessage(playerid, RED, "Vocк Ja Possui Um Veiculo!");
			if (GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, RED, "Saia de seu interior"); // To prevent screw ups
			GetPlayerPos(playerid, OrgX[playerid], OrgY[playerid], OrgZ[playerid]);
			new color1 = CarColor[playerid][0];
			new color2 = CarColor[playerid][1];
			TogglePlayerControllable(playerid, 0);
		    SetPlayerCameraPos(playerid, -1980.9927,293.0207,38.9285);
			SetPlayerCameraLookAt(playerid, -1971.9277,284.5396,34.8777);
			SetPlayerVirtualWorld(playerid, playerid);
			if(IsPlayerInTaxiLS(playerid))
		    {
		        SetPlayerCameraPos(playerid, 1432.7231,-1665.6484,13.3828);
				SetPlayerCameraLookAt(playerid, 1436.6174,-1666.0939,13.5469);
	        	SetPlayerPos(playerid,1448.3098,-1665.8339,13.2680);
		    	ShopCar[playerid] = CreateVehicle(CarModels[0], 1438.3098,-1665.8339,13.2680, 0.0, color1, color2, 6000000);
		    }
		    if(IsPlayerInTaxiLV(playerid))
		    {
		        SetPlayerCameraPos(playerid, 2039.2286,1917.5132,12.1674);
				SetPlayerCameraLookAt(playerid, 2034.1730,1917.0808,12.1785);
	        	SetPlayerPos(playerid,2042.5013,1916.6371,11.9750);
		    	ShopCar[playerid] = CreateVehicle(CarModels[0], 2032.5013,1916.6371,11.9750, 0.0, color1, color2, 6000000);
		    }
		    if(IsPlayerInTaxiSF(playerid))
		    {
		        SetPlayerCameraPos(playerid, -1990.3564,257.4485,35.1719);
				SetPlayerCameraLookAt(playerid, -1985.4454,257.3991,35.1719);
	        	SetPlayerPos(playerid,-1993.9315,257.6205,34.8931);
		    	ShopCar[playerid] = CreateVehicle(CarModels[0], -1983.9315,257.6205,34.8931, 0.0, color1, color2, 6000000);
		    }
			SetVehicleVirtualWorld(ShopCar[playerid], playerid);
		    PutPlayerInVehicle(playerid, ShopCar[playerid], 0);
			TogglePlayerControllable(playerid, 0);
			CarShopping[playerid] = true;
			Conce[playerid] = 1;
			new gt[128];
        	format(gt, sizeof gt, "Veiculo: %s Valor: %d", VehicleName[carbrowse[playerid]],CarModels[carbrowse[playerid]]);
        	ShowPlayerDialog(playerid, 138, DIALOG_STYLE_LIST, gt, "Modelo Anterior\nModelo Seguinte\nDigitar ID Veiculo\nComprar Veiculo\nCancelar Compra", "Escolher", "");
		}
	    else
	    {
	    	SendClientMessage(playerid, BRANCO, "Vocк presisa estar na concessionбria");
	    }
		return 1;
	}