Raised This Month: $ Target: $400
 0% 

Menu Case Check


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DarthMan
Veteran Member
Join Date: Aug 2011
Old 03-01-2017 , 05:32   Re: Menu Case Check
Reply With Quote #3

Quote:
Originally Posted by jimaway View Post
just store the model file name in the item info string
That didn't work. Can you show me exactly how?
Here is how the models are displayed :
Code:
		case 0:
		{
		new menu_model = menu_create("Models Menu", "mh_MMenu")
		for (new i; (i < file_size(conffile_model, 1)); i++)
		{
			read_file(conffile_model, i, file_model, 127, leng)
			menu_additem(menu_model, file_model, "", 0);
		}		
		menu_setprop(menu_model, MPROP_EXIT, MEXIT_ALL);
		menu_setprop(menu_model, MPROP_BACKNAME, "Back");
		menu_setprop(menu_model, MPROP_NEXTNAME, "Next");
		menu_setprop(menu_model, MPROP_EXITNAME, "Close");
		menu_destroy(menu);
		menu_display(id, menu_model, 0);
		}
The problem goes here :

Code:
public mh_MMenu(id, menu_model, item)
{
	if(item == MENU_EXIT)
	{
		menu_cancel(id);
		return PLUGIN_HANDLED;
	}

	new command[6], name[64], access, callback;

	menu_item_getinfo(menu_model, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

	
	switch (item)
	{
		case 0:
		{
		read_file(conffile_model, item, file_model, 127, leng)
		tfc_setmodel(id,file_model,"0");
		client_print(id, print_chat, "You changed the player model to %s.", file_model);		
		}
	}
	menu_destroy(menu_model);

	return PLUGIN_CONTINUE;
}
I tried replacing the item as u said, but with no luck, so I changed it back.
DarthMan 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 20:59.


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