/* AMX MOD X
*   Matrix Mod - menu.inl
*
* (c) Copyright 2006 by Knekter
*
* This file is provided as is (no warranties)
*/

public MM_MENU_show(id)
{
	new keys, class;
	keys = (1<<0|1<<1|1<<2|1<<3);

	// Get player class
	class = MM_get_pdata(id, pdata_class);

	new menu[256];

	// Format the menu
	new len = format(menu, 255, "\rClass Menu^n");
	len += format(menu[len], 255 - len, "\y1.\w Neo^n");
	len += format(menu[len], 255 - len, "\y2.\w Agent Smith^n");
	len += format(menu[len], 255 - len, "\y3.\w Machine^n");
	len += format(menu[len], 255 - len, "\y4.\w Phasing Twins^n");

	// If no longer human show exit key
	if(class != human)
	{
		len += format(menu[len], 255 - len, "\y0.\w Exit^n");
		keys |= (1<<9);
	}

	len += format(menu[len], 255 - len, "Currently: %s", g_classes[class]);
	show_menu(id, keys, menu, -1, "cmenu");
}

public hook_classmenu(id, keys)
{
	// Set player class and show info
	MM_set_pdata(id, pdata_class, keys + 1);
	MM_UTIL_showinfo(id);
}