Официалният форум на iPlay.bg 

Този раздел е създаден специално за проблеми и въпроси за направата на плъгини или преработката на вече съществуващи кодове.
 #390973  от southdivision
 пон май 23, 2016 3:48 pm
Код: Избери всички
public pShop(id)
{
    new menu_title[1024]
    new item[1024], close[15], back[15], next[15]
   Cash[id] = cs_get_user_money(id);
   
    formatex(menu_title, charsmax(menu_title), "\w[\yTestMenu\w] \rtest^n\ytest: \r%d \d| \wStranica:",Cash[id])
	
	new customshop = menu_create(menu_title, "PShopHandler")
	
	if (Cash[id] >= 60) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 0), itemlimit(0))
	menu_additem(customshop, item, "0", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 0), itemlimit(0))
	menu_additem(customshop, item, "0", 0)
	}
	
	if (Cash[id] >= 60) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 1), itemlimit(1))
	menu_additem(customshop, item, "1", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 1), itemlimit(1))
	menu_additem(customshop, item, "1", 0)
	}
	
	if (Cash[id] >= 60) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 2), itemlimit(2))
	menu_additem(customshop, item, "2", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 2), itemlimit(2))
	menu_additem(customshop, item, "2", 0)
	}
	
	if (Cash[id] >= 125) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 3), itemlimit(3))
	menu_additem(customshop, item, "3", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 3), itemlimit(3))
	menu_additem(customshop, item, "3", 0)
	}
	
	if (Cash[id] >= 145) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 4), itemlimit(4))
	menu_additem(customshop, item, "4", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 4), itemlimit(4))
	menu_additem(customshop, item, "4", 0)
	}
	
	if (Cash[id] >= 75) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 5), itemlimit(5))
	menu_additem(customshop, item, "5", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 5), itemlimit(5))
	menu_additem(customshop, item, "5", 0)
	}
	
	if (Cash[id] >= 75) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 6), itemlimit(6))
	menu_additem(customshop, item, "6", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 6), itemlimit(6))
	menu_additem(customshop, item, "6", 0)
	}
	
	if (Cash[id] >= 95) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 7), itemlimit(7))
	menu_additem(customshop, item, "7", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 7), itemlimit(7))
	menu_additem(customshop, item, "7", 0)
	}
	
	if (Cash[id] >= 125) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 8), itemlimit(8))
	menu_additem(customshop, item, "8", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 8), itemlimit(8))
	menu_additem(customshop, item, "8", 0)
	}
	
	if (Cash[id] >= 185) {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 9), itemlimit(9))
	menu_additem(customshop, item, "9", 0)
	}
	else {
	formatex(item, charsmax(item), "\wTest1Test2Test3\r(x1) \y[\rtest1\y] [\test\r/\ytest\y]",get_user_limit(id, 10), itemlimit(9))
	menu_additem(customshop, item, "9", 0)
	}

	formatex(close, charsmax(close), "Izhod")
	formatex(back, charsmax(back), "Nazad")
	formatex(next, charsmax(next), "Sledvashta stranica")
	
	menu_setprop(customshop, MPROP_EXITNAME, close)
	menu_setprop(customshop, MPROP_BACKNAME, back)
	menu_setprop(customshop, MPROP_NEXTNAME, next)
	
	menu_display(id, customshop, 0)
	
	return PLUGIN_HANDLED;
}
Проблема е ,че като отворя на първа страница въпросния pShop(id) се показва без бутоните за " Назад,Следваща страница,Изход"
Изображение
A KOГАТО РЕША да отворя Следващата страница (Втората страница) - Няма проблем (явно защото има по малко неща за избор)
Изображение