I mean : For Example There empty menu and when is say !addslot then slot is added to menu.
Help plz
Scripts
Menu Slot
Menu Slot
1

addhook("serveraction" , "sa")
function sa(id,action)
	if action==1 then
	menu(id,"Menu Name!!,Name of slot¹,Name of slot²")
	end
end
my_menu = "Title" -- global declaration
-- assuming that you have totable/string.split
-- Menu builder
addhook("say", "menu_cmds")
function menu_cmds(id, txt)
	txt = txt:split()
	if txt[1] == "!addslot" then
		my_menu = my_menu .. "," .. txt:sub(#"!addslot")
	elseif txt[1] == "!showmenu" then
		menu(id, my_menu)
	end
end
addhook("menu", "menu_handler")
function menu_handler(id, title, sel)
	if title ~= "Title" then return end
	-- Get the table of the selections, remember that they are delimited by commas
	local m = my_menu:split(",")
	-- m = {"Title", ...} <- plus 1 offset to selection
	local selection = m[sel+1]
	-- selection contains the text of the selection
	... <- your own code here
end
--Change
		my_menu = my_menu .. "," .. txt:sub(#"!addslot")
-- To
		my_menu = my_menu .. "," .. txt:sub(#"!addslot"):split(",")[1]
TITLE = "Votemap"
my_menu = title.."@b" -- or whatever the large one is
-- assuming that you have totable/string.split
maps = {}
-- Menu builder
addhook("say", "menu_cmds")
function menu_cmds(id, txt)
	txt = txt:split()
	if txt[1] == "!addmap" then
		my_menu = my_menu .. "," .. txt:sub(#"!addslot")
	elseif txt[1] == "!votemap" then
		menu(id, my_menu)
	elseif txt[1] == "!tally" then
		local max = -1
		local target_map = ""
		for map,votes in pairs(maps) do
			if votes>max then
				max = votes
				target_map = map
			end
		end
		msg("Changing map to "..target_map)
		parse("map "..target_map)
		-- You can also make your script more secure
		-- parse("map "..target_map:split(";")[1])
	end
end
addhook("menu", "menu_handler")
function menu_handler(id, title, sel)
	if title ~= TITLE then return end
	local m = my_menu:split(",")
	local map = m[sel+1]
	if not maps[map] then maps[map] = 0 end
	maps[map] = maps[map] + 1
end
function string.split(t, b)
	local cmd = {}
	local match = "[^%s]+"
	if b then
		match = "%w+"
	end
	if type(b) == "string" then match = "[^"..b.."]+" end
	if not t then return invalid() end
	for word in string.gmatch(t, match) do
		table.insert(cmd, word)
	end
	return cmd
end
totable = string.split
1
