29.09.2015, 16:06
When the person does /sellvehicle and the other person types /accept vehicle it does not work, but prior to them doing /sellvehicle you can type /accept vehicle and it says you are not being offered. Im not sure what the problem is...
Quote:
else if(strcmp(x_job,"vehicle",true) == 0) { new carsellerid = SellVehicleOffer[playerid]; new carsellerslot = SellVehicleSlot[playerid]; new carsellerprice = SellVehiclePrice[playerid]; new Float:X,Float:Y,Float:Z,Float:F; if(SellVehicleOffer[playerid] != 999) { if(PlayerInfo[playerid][pCash] >= carsellerprice) { if(IsPlayerConnected(carsellerid)) { if(ProxDetectorS(10.0, playerid, giveplayerid)) { if(carsellerslot == 1) { GetVehiclePos(PlayerVehicleID1[carsellerid],X,Y,Z); ` GetVehicleZAngle(PlayerVehicleID1[carsellerid],F); if(PlayerInfo[playerid][PlayerVehicleModel1] == 0) { PlayerInfo[playerid][pCash] -= carsellerprice; GivePlayerMoney(playerid,-carsellerprice); format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice); SendClientMessage(carsellerid,COLOR_YELLOW,string) ; ReplacePlayerVehicle(carsellerid, playerid, 1,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid) RemovePlayerFromVehicle(carsellerid); ResetPlayerVehicle(carsellerid,carsellerslot); CreatePlayerVehicle(playerid,1); SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z); SetVehicleZAngle(PlayerVehicleID1[playerid],F); } else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0) { PlayerInfo[playerid][pCash] -= carsellerprice; GivePlayerMoney(playerid,-carsellerprice); format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice); SendClientMessage(carsellerid,COLOR_YELLOW,string) ; ReplacePlayerVehicle(carsellerid, playerid, 1,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid) RemovePlayerFromVehicle(carsellerid); ResetPlayerVehicle(carsellerid,carsellerslot); CreatePlayerVehicle(playerid,2); SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z); SetVehicleZAngle(PlayerVehicleID2[playerid],F); } } } } } else { SendClientMessage(playerid, COLOR_GREY, " You can't afford that !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Nobody offered you to sell his vehicle !"); return 1; } } else { return 1; } } return 1; } |