[Ajuda] /veiculo trancar
#7

Ok, consegui resolver o problema do /veнculo trancar deixando o carro exclusivo somente para o dono.

Mбs surgiu outro problema, quando coloco o comando /veiculo vender o veнculo passa a ficar a venda no ъtimo local que eu estacionei ele, qual funзгo eu uso pra ele voltar para a concessionaria ?

Код:
		if(strcmp(tmp, "vender", true) == 0)
		{
		    if(IsPlayerConnected(playerid))
			{
				GetPlayerName(playerid, playername, sizeof(playername));
				if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
				{
					SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
					return true;
				}
				if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
				{
					SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
					return true;
				}
				if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
				{
					new car = PlayerInfo[playerid][pVeiculo];
					CarInfo[car][cOwned] = 0;
					CarInfo[car][cModel] = 560;
					CarInfo[car][cColorOne] = 0;
				    CarInfo[car][cColorTwo] = 0;
					GetPlayerName(playerid, sendername, sizeof(sendername));
					strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
					GivePlayerMoney(playerid,CarInfo[car][cValue]);
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
					GameTextForPlayer(playerid, string, 10000, 3);
					RemovePlayerFromVehicleEx(playerid);
					Controle(playerid, 1);
					PlayerInfo[playerid][pCarKey] = 0;
					PlayerInfo[playerid][pVeiculo] = 0;
					SaveCars();
					return true;
				}
				else if(PlayerInfo[playerid][pCarKey2] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo2]][cOwner], true) == 0)
				{
					new car = PlayerInfo[playerid][pVeiculo2];
					CarInfo[car][cOwned] = 0;
					CarInfo[car][cModel] = 560;
					CarInfo[car][cColorOne] = 0;
				    CarInfo[car][cColorTwo] = 0;
					GetPlayerName(playerid, sendername, sizeof(sendername));
					strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
					GivePlayerMoney(playerid,CarInfo[car][cValue]);
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
					GameTextForPlayer(playerid, string, 10000, 3);
					RemovePlayerFromVehicleEx(playerid);
					Controle(playerid, 1);
					PlayerInfo[playerid][pCarKey2] = 0;
					PlayerInfo[playerid][pVeiculo2] = 0;
					SaveCars();
					return true;
				}
			}
			return true;
		}
Reply


Messages In This Thread
[Ajuda] /veiculo trancar - by Fannatic_Fodao - 12.06.2012, 02:22
Re: [Ajuda] /veiculo trancar - by StrondA_ - 12.06.2012, 04:54
Re: [Ajuda] /veiculo trancar - by Fannatic_Fodao - 12.06.2012, 11:56
Re: [Ajuda] /veiculo trancar - by rjjj - 12.06.2012, 12:53
Re: [Ajuda] /veiculo trancar - by Fannatic_Fodao - 12.06.2012, 13:19
Re: [Ajuda] /veiculo trancar - by rjjj - 12.06.2012, 13:43
Re: [Ajuda] /veiculo trancar - by Fannatic_Fodao - 12.06.2012, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)