17.09.2017, 15:47
I was creating some buy car in dealerships system, And when i use the command, It only shows an empty dialog with just title, Vehicle Name and Price, and plus there's no error / warning in the compiler
If you ask about the and MAX_CARDEALERSHIPS MAX_DEALERSHIPVEHICLES, its here
Код:
CMD:dealerships(playerid, params[]) { for(new d=0; d < MAX_CARDEALERSHIPS; d++) { if(CarDealershipInfo[d][cdOwned]) { if(IsPlayerInRangeOfPoint(playerid, 3, CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ])) { new str[900], string[64]; format(STRING, "Vehicle Name\tPrice\n"); strcat(str, string); for(new v = 0; v < MAX_DEALERSHIPVEHICLES; v++) { if(CarDealershipInfo[d][cdVehicleModel][v] > MIN_VEHI_ID && CarDealershipInfo[d][cdVehicleModel][v] > MAX_VEHI_ID) { format(STRING, "%s\t$%d", VehicleName[CarDealershipInfo[d][cdVehicleModel][v] - 400], CarDealershipInfo[d][cdVehicleCost][v]); strcat(str, string); } } ShowPlayerDialog(playerid, DIALOG_CDNEWBUY, DIALOG_STYLE_TABLIST_HEADERS, "Dealerships", str, "Buy", "Cancel"); } } } return 1; }
Код:
#define MAX_CARDEALERSHIPS 15 #define MAX_DEALERSHIPVEHICLES 10