public atacjailmenu(id, level, cid)
{
	if(!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	g_MenuPage[id] = 0
	show_jail_menu(id)
	return PLUGIN_HANDLED
}

show_jail_menu(id)
{
	new menuoption[10][64], menubody[512]
	new keys, menu[16]
	for(new z = 0; z < 10; z++) menuoption[z][0] = 0 // clear string
	switch(g_MenuPage[id])
	{
		case 0:
		{
			copy (menu, 15, "Jail Maker's")
			keys |= (1<<0)|(1<<2)|(1<<9)
			format(menuoption[0], 63, "\w1. NoClip")
			if(g_map_cors_pre)
			{
				keys |= (1<<1)
				format(menuoption[1], 63, "\w2. Teleport to Jail (%ix, %iy, %iz)", g_map_cors_origin[0], g_map_cors_origin[1], g_map_cors_origin[2])
			}
			else
				format(menuoption[1], 63, "\d2. Teleport to Jail (No Coordinates)")

			format(menuoption[2], 63, "\w3. Save Coordinate to file.")
			format(menuoption[9], 63, "\w0. Exit")
			format(menubody, 511, "\y[ATAC] %s:^n^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n^n%s^n%s", menu, menuoption[0], menuoption[1], menuoption[2], menuoption[3], menuoption[4], menuoption[5], menuoption[6], menuoption[7], menuoption[8], menuoption[9])
		}
		case 1:
		{
			copy (menu, 15, "Confirmation")
			keys |= (1<<0)|(1<<1)
			format(menuoption[0], 63, "\w1. Yes (%ix %iy %iz)", g_corsSave[0], g_corsSave[1], g_corsSave[2])
			format(menuoption[1], 63, "\w2. No")
			format(menubody, 511, "\y[ATAC] %s:^n^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n^n%s^n%s", menu, menuoption[0], menuoption[1], menuoption[2], menuoption[3], menuoption[4], menuoption[5], menuoption[6], menuoption[7], menuoption[8], menuoption[9])

		}
	}
	show_menu(id, keys, menubody, -1, "[ATAC] Jail Menu")
	return PLUGIN_HANDLED
}

public atac_jail_menu(id, key)
{
	switch(g_MenuPage[id])
	{
		case 0:
		{
			switch(key)
			{
				case 0:
					noclip(id)
				case 1:
				{
					if(g_map_cors_pre)
						jail_teleport(id)
				}
				case 2:
				{
					get_user_origin(id, g_corsSave)
					g_MenuPage[id]++
					show_jail_menu(id)
				}
				case 9:
					return PLUGIN_HANDLED
			}
		}
		case 1:
		{
			switch(key)
			{
				case 0:
				{
					jailsave(id, g_corsSave)
					g_MenuPage[id]--
					show_jail_menu(id)
					return PLUGIN_HANDLED

				}
				case 1:
				{
					g_MenuPage[id]--
					show_jail_menu(id)
					return PLUGIN_HANDLED
				}
			}
		}
	}
	show_jail_menu(id)
	return PLUGIN_HANDLED
}