addhook("attack","noreloadAttack")
function noreloadAttack(id)
	if SERVER_DATA["noreload"] then
		local w = player(id,"weapontype")
		if w > 0 then
			parse("equip "..id.." "..w)
		end
	end
end

function NoreloadButton()
	if SERVER_DATA["noreload"] then
		return "No Reload|Enabled"
	end
	return "No Reload|Disabled"
end

function NoreloadToggle()
	if SERVER_DATA["noreload"] then
		SERVER_DATA["noreload"] = nil
		msg("no reload DISABLED@C")
	else
		SERVER_DATA["noreload"] = true
		msg("no reload ENABLED@C")
	end
end

CreateSetting(NoreloadButton, NoreloadToggle)

CreateConsole "sv_noreload" [[
	if args >= 2 then
		local mode = tonumber(s[2])
		if mode then
			if mode == 1 then
				if not SERVER_DATA["noreload"] then
					SERVER_DATA["noreload"] = true
					msg("no reload ENABLED@C")
				end
			elseif mode == 0 then
				if SERVER_DATA["noreload"] then
					SERVER_DATA["noreload"] = nil
					msg("no reload DISABLED@C")
				end
			end
		end
	end
]]