Raised This Month: $ Target: $400
 0% 

prevent double items in menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
faki
Senior Member
Join Date: Jul 2013
Old 03-07-2014 , 07:15   prevent double items in menu
Reply With Quote #1

I build a menu with categories and after that i hook second menu.

I need to prevent the code to show double categories.
Here is the code:
Code:
		for(new i=1;i < file_size(file,1);i++)
		{

			formatex(tempid4,255,"%d",i-1)
			new data[1024],buffer
			read_file(file,i,data,1023,buffer)
                        parse(data,category,63)
                        if(!equal(data,"//",2) && !equal(data,"")) 
                        menu_additem(menu,category,tempid4,0)
		}
Here is content in ini file:
"Deathrun" "IP: 127.0.0.1:27016"
"Deathrun" "IP: 127.0.0.1:27017"
"Classic" "IP: 127.0.0.1:27018"

But in category menu shows Deathrun two times i need to show only one item as name "Deathrun".
faki 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 05:55.


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