menu Items

y0mike

Active member
Joined
May 10, 2014
Messages
97
Reaction score
41
Location
mizus girl's house
can someone explain the basics of menu items? Mine is fucked up.

Code:
menu_newcheats = menu_new(menu_main, ID_MENU_NEWCHEATS, menu_callback_newcheats);

Code:
menu_item_add(menu_main, menu_newcheats, "New Cheats", ID_NONE, MENU_COLOR_SEPARATOR, NULL);

Code:
menu_item_add(menu_newcheats, NULL, "No Spread", ID_CHEAT_NO_SPREAD, MENU_COLOR_DEFAULT, NULL);

What am I doin wrong? "No Spread" wont enable? also it bugged the s0beit menu.
also i know im a fuckin noob. this my 1st time with s0beit, im just usin it to learn more with gamehackin and menu's.
 

y0mike

Active member
Joined
May 10, 2014
Messages
97
Reaction score
41
Location
mizus girl's house
Dem0n link said:
Does it give any errors? and do you have function for "No Spread"?

yeah, i know im not doing something right though. It wont let me go back to the main s0b menu + it bugs it, also whenever i enable it, no spread doesnt turn on.
no errors*
Code:
static int menu_callback_newcheats(int op, struct menu_item *item)
{
	switch (op)
	{
	case MENU_OP_ENABLED:
		switch (item->id)
		{
		case ID_CHEAT_NO_SPREAD:
			return cheat_state->_generic.spread;
		}
		break;
	
	case MENU_OP_SELECT:
		switch (item->id)
		{
		case ID_CHEAT_NO_SPREAD:
			cheat_state->_generic.spread ^= 1;
			break;
		default:
			return 0;
		} 
		
	}
	return 0;
}
appreciate the help bro
 
Top