[Help] Dialog auto next page
#1

Greeting

I work with SQL code, I have a problem with dialogue, when I put more product in the business than you can c in the dialogue I see everything, I now need when I'm full in sql database products that we automatically sinker placed on the next page, something similar as mSelection menu with occupancy diverter on the next page, eh now believes it needs to dialogue ..


code

Код:
//
// Callback for Product buying
//
public SQL_business_buyProd(playerid, id) {
	new rows,
		fields;

	cache_get_data(rows, fields, DBHandle);
	if (rows) {
		new i,
			str[DIALOG_STRING_EXT],
			tmpStr[SAY_TEXT];

		format(str, sizeof(str), "{CDCDCD}ID{FFFFFF}\t Produkt\t Kolicina\t Cijena (Trosak Dostave)\n");
		for (i = 0; i < rows; ++i) {

			if (cache_get_field_content_int(i, "quantity") < 1)
				continue;

			//dialoge menu
			format(tmpStr, sizeof(tmpStr),
				"{CDCDCD}%d{FFFFFF}\t %s\t %d\t {FFFF00}%d $ {FFFFFF}({CDCDCD}%d ${FFFFFF})\n",
				cache_get_field_content_int(i, "id"),
				business_bootstrapProducts(id, cache_get_field_content_int(i, "productType")),
				cache_get_field_content_int(i, "quantity"),
				cache_get_field_content_int(i, "price"),
				cache_get_field_content_int(i, "transportCost")
			);

			strcat(str, tmpStr);
		}

		format(tmpStr, sizeof(tmpStr), "%s :: {66B2FF}Popuni Zalihe", business_sortType(business[id][businessType]));
		return SPD(playerid, dialog_BUSINESS_OWNER2a, DIALOG_STYLE_TABLIST_HEADERS,
			tmpStr,
			str,
			DIALOG_BUY,
			DIALOG_CLOSE
		);
	}
	else {
		ERR("U bazi trenutno nema ni jednog produkta za vas Biznis.");
	}

	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)