CreateChat "@kick" "<id>" (15) [[
	local p = tonumber(s[2])
	if p and player(p,"exists") then
		if SERVER_RANK[USER[p]["rank"] ].lvl < SERVER_RANK[USER[id]["rank"] ].lvl then
			ServerMSG(player(id,"name").." kicked "..player(p,"name"))
			parse("kick "..p)
		else
			ErrorMSG(id, "You can't kick someone that's higher/equal rank")
		end
	elseif not p then
		kick_menu:OpenPlayer(id, 1)
	end
]]

kick_menu = CreateMenu("Kick Player")

function kick_menu:getcustombutton(i)
	local id = player(0,"table")[i]
	if id then return player(id,"name") end
end

function kick_menu:click(id,button,page)
	local p = player(0,"table")[button]
	if p and player(p,"exists") then
		if player(p,"exists") then
			if SERVER_RANK[USER[p]["rank"]].lvl < SERVER_RANK[USER[id]["rank"]].lvl then
				ServerMSG(player(id,"name").." kicked "..player(p,"name"))
				parse("kick "..p)
			else
				ErrorMSG(id, "You can't ban someone that's higher/equal rank")
			end
		end
	end
	if button > 0 then
		kick_menu:OpenPlayer(id, page)
	end
end

AddMenu(kick_menu, 15)