14.04.2016, 15:04
Now it will not accept and cancel not know what
Код:
if(dialogid == SELLTOCAR) { if(response) { if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Morate biti barem lvl 5 da kupite vozilo!"); return 1; } if(OwnableCarOffer[playerid] < 999) { if(OwnableCarID[playerid] == 0) { return 1; } if(OwnableCarPrice[playerid] == 0 || OwnableCarPrice[playerid] > 100000) { return 1; } if(OwnableCarID[playerid] == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]) { } else if(OwnableCarID[playerid] == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]) { } else if(OwnableCarID[playerid] == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]) { } else { SendClientMessage(playerid, COLOR_GREY, " Offer is no longer available"); return 1; } if(PlayerInfo[playerid][pEvro] >= OwnableCarPrice[playerid]) { if(IsPlayerConnected(OwnableCarOffer[playerid])) { new giveplayer[MAX_PLAYER_NAME]; GetPlayerName(OwnableCarOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pPcarkey] == 999) { if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3] = 999; } else { SendClientMessage(playerid, COLOR_GREY, " Prodavac auta mora sjedati u svom autu !"); return 1; } format(string, sizeof(string), "* Kupili ste auto za %dE od %s-a.",OwnableCarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s je kupio auto za %dE.",sendername,OwnableCarPrice[playerid]); SendClientMessage(OwnableCarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(OwnableCarOffer[playerid]); PlayerInfo[playerid][pEvro] -= OwnableCarPrice[playerid]; PlayerInfo[OwnableCarOffer[playerid]][pEvro] += OwnableCarPrice[playerid]; strmid(CarInfo[OwnableCarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); } else if(PlayerInfo[playerid][pPcarkey2] == 999) { if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3] = 999; } else { SendClientMessage(playerid, COLOR_GREY, " Prodavac auta mora sjedati u svom autu !"); return 1; } format(string, sizeof(string), "* Kupili ste auto za %dE od %s-a.",OwnableCarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s je kupio auto za %dE.",sendername,OwnableCarPrice[playerid]); SendClientMessage(OwnableCarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(OwnableCarOffer[playerid]); PlayerInfo[playerid][pEvro] -= OwnableCarPrice[playerid]; PlayerInfo[OwnableCarOffer[playerid]][pEvro] += OwnableCarPrice[playerid]; strmid(CarInfo[OwnableCarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); } else if(PlayerInfo[playerid][pPcarkey3] == 999) { if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey2] = 999; } else if(GetPlayerVehicleID(OwnableCarOffer[playerid]) == PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3]; PlayerInfo[OwnableCarOffer[playerid]][pPcarkey3] = 999; } else { SendClientMessage(playerid, COLOR_GREY, " Prodavac auta mora sjedati u svom autu !"); return 1; } format(string, sizeof(string), "* Kupili ste auto za %dE od %s-a.",OwnableCarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s je kupio auto za %dE.",sendername,OwnableCarPrice[playerid]); SendClientMessage(OwnableCarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(OwnableCarOffer[playerid]); PlayerInfo[playerid][pEvro] -= OwnableCarPrice[playerid]; PlayerInfo[OwnableCarOffer[playerid]][pEvro] += OwnableCarPrice[playerid]; strmid(CarInfo[OwnableCarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); } else { SendClientMessage(playerid, COLOR_GREY, " Vec imate 3 auta ! "); return 1; } DateProp(playerid); DateProp(OwnableCarOffer[playerid]); OnPropUpdate(); OnPlayerUpdateCustom(playerid); OnPlayerUpdateCustom(OwnableCarOffer[playerid]); OwnableCarOffer[playerid] = 999; OwnableCarID[playerid] = 0; OwnableCarPrice[playerid] = 0; GameTextForPlayer(playerid, "~w~Cestitamo~n~Nemojte zaboraviti da ga parkirate (/v park)!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Cestitamo na novoj kupovini!"); SendClientMessage(playerid, COLOR_GRAD2, "Kucajte /vehiclemanual da procitate uputstva za auto!"); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " Prodavac auta je offline !"); return 1; } } } else { GetPlayerName(playerid, sendername, sizeof(sendername)); OwnableCarOffer[playerid] = 999; OwnableCarID[playerid] = 0; OwnableCarPrice[playerid] = 0; format(string, sizeof(string), "* %s je odbio ponudu.",sendername); SendClientMessage(OwnableCarOffer[playerid], COLOR_WHITE, string); return 1; } }