Raised This Month: $ Target: $400
 0% 

Generation of the old menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nixon133
Junior Member
Join Date: Jan 2014
Old 12-13-2014 , 05:19   Generation of the old menu
Reply With Quote #1

Hello.
Immediately apologize for the English language.
The question seems clear and understandable. How to make through the old menu, two pages?

Code of players do not need a menu, then the problem lies elsewhere.
When you create a menu of the players in the loop, only one line formatex (possibly with conditions)

Code:
	for(new i = iStart; i < iEnd; i++)	{
		iPlayer = g_iMenuPlayers[i];
		get_user_name(iPlayer, szName, charsmax(szName));
		
		if(iPlayer == id) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
		else {
			iKeysMenu |= (1 << iCount);
			iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
		}
	}
Here we see that in the loop body is executed only one formatex (one of the two conditions).
But, in my case in the loop may be more than 9 formatex.

Code:
	for(new i = iStart; i < iEnd; i++)	{
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "");
	}
Here cat, it's for example. We see that in the loop 4 formatex.

Now the problem itself, because 4 formatex , then the cycle must be performed 4 times !? However, since in the loop formatex 4 and 4 times a loop is executed, then 4x4 = 16 formatex and the menu will not be 4 points and 16.

This is the whole problem of how to make the cycle more than 9 formatex , you need to like the menu with the players was 9 ago, 0 - forward \ output.
Nixon133 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode