12.06.2012, 17:42
Quando escrevo o comando /veiculo vender para ver o veнculo VIP ele vende e entгo o carro passa a ser vendido no ъltimo local que foi dado o /veiculo estacionar, eu queria ajuda pra faze-lo ser vendido novamente na concessionaria e nгo onde foi salvo o ъltimo spawn. Alguem pode ajudar ? +rep pra quem tiver a boa vontade.
Obrigado
Obrigado
Код:
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; }